hibernate mapping configuration

<!-- Configure Hibernate Session Factory -->
	<bean id="sessionFactory"
		class="org.springframework.orm.hibernate5.LocalSessionFactoryBean">
		<!-- datasource-->
		<property name="dataSource" ref="dataSource" />
		<!-- Hibernate mapping configuration resources -->
		<property name="mappingLocations">

<value>classpath:/com/cqeec/sams/entity/**/*.hbm.xml</value>

</property> <!-- Hibernate Properties--> <property name="hibernateProperties"> <props> <!-- Database Dialect--> <prop key="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect </prop> <!-- Whether to display the SQL statement, true, display the SQL statement; false, not display (default value). --> <prop key="hibernate.show_sql">true</prop> <!-- Formatted sql statements are not formatted by default--> <prop key="hibernate.format_sql">true</prop> <! -- Generate the DDL of database objects according to the mapping file between Hibernate tables and objects --> <!-- The properties in it are: none: do nothing, create: delete the original table and create it again, update: update the table, create-drop : delete the original table and create it again, delete the table when the server stops --> <prop key="hibernate.hbm2ddl.auto">create</prop> </props> <!-- <value> database dialect hibernate.dialect =org.hibernate.dialect.MySQL5Dialect Whether to display the SQL statement, true, display the SQL statement; false, not display (default value). hibernate.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324686154&siteId=291194637