0
こんにちは私は奇妙な問題があります。私はspring + hibernateを設定しました。 I`mは、注釈の設定を使用しますが休止状態にすることは、私は、サーバーを再起動/再発行/起動したときに私のDB構造を作成する必要はありません:(休止状態の自動作成では、春の作業はできません。
これは、ルートのcontext.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">
<!-- Root Context: defines shared resources visible to all other web components -->
<!-- Datasource configration -->
<bean id="luxpolDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://localhost:3306/luxpol" />
<property name="username" value="user" />
<property name="password" value="pass" />
</bean>
<bean id="hibernateSessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource" ref="luxpolDataSource" />
<property name="packagesToScan" value="com.fixus.luxpol.bean" />
<property name="annotatedClasses">
<list>
<value>com.fixus.luxpol.bean.House</value>
<value>com.fixus.luxpol.bean.Photo</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</prop>
<prop key="hibernate.format_sql">true</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.hbm2dll.auto">create</prop>
</props>
</property>
</bean>
<mvc:annotation-driven />
<context:component-scan base-package="com.fixus.luxpol" />
<context:component-scan base-package="com.fixus.luxpol.bean" />
から私のconfigです
は私が間違っているか知っている `tを:/
ありがとうございました:)私はそれを逃すことができますか? – Fixus