SSH框架中如何在applicationContext.xml中配置SessionFactory使其显示sql语句

<property name="hibernateProperties">
			<props>
				<prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop><!-- 数据库方言 -->
				<prop key="hibernate.hbm2ddl.auto">update</prop> <!--自动创建表 -->
				<prop key="javax.persistence.validation.mode">none</prop>
				<prop key="hibernate.show_sql">true</prop>
				<prop key="hibernate.format_sql">true</prop>
			</props>
		</property>

猜你喜欢

转载自blog.csdn.net/qq_41700374/article/details/81911101
今日推荐