1 <jdbc:embedded-database id="dataSourceDERBY" type="DERBY"></jdbc:embedded-database> 2 <jdbc:embedded-database id="dataSourceHSQL" type="HSQL"></jdbc:embedded-database> 3 <jdbc:embedded-database id="dataSourceH2" type="H2"></jdbc:embedded-database> 4 <bean 5 id="sessionFactory" 6 class="org.springframework.orm.hibernate4.LocalSessionFactoryBean"> 7 <property name="dataSource"> 8 <ref bean="dataSourceH2"/> 9 </property> 10 <property name="hibernateProperties"> 11 <props> 12 <prop key="hibernate.dialect">org.hibernate.dialect.H2Dialect</prop> 13 <prop key="hibernate.show_sql">true</prop> 14 <prop key="hibernate.format_sql">true</prop> 15 <prop key="hibernate.hbm2ddl.auto">update</prop> 16 </props> 17 </property> 18 <!-- 19 <property name="annotatedClasses"> 20 <list> 21 <value>zwh.spring.security.po.User</value> 22 <value>zwh.spring.security.po.Role</value> 23 </list> 24 </property> 25 --> 26 </bean>
时间: 2024-10-15 09:46:16