阅读背景:

hibernate session.get()方法(这里的session跟html根本不是一回事)

来源:互联网 



hibernate.cfg.xml

<!DOCTYPE hibernate-configuration PUBLIC
	"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
	"https://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">

<hibernate-configuration>
	<session-factory >
		<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
		<property name="connection.driver_class">com.mysql.jdbc.Driver</property>
		<property name="connection.url">jdbc:mysql:///test</property>
		<property name="connection.username">root</property>
		<property name="connection.password"></property>
		<property name="hbm2ddl.auto">update</property>
		<mapping resource="cn/itcast/hibernate/domain/User.hbm.xml"/>
	
	</session-factory>
</hibernate-configuration><!DOCTYPE hibernat



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: