慕粉3229487
2016-05-08 12:18
五月 08, 2016 12:13:36 下午 org.hibernate.Version logVersion INFO: HHH000412: Hibernate Core {5.1.0.Final} INFO: HHH000206: hibernate.properties not found INFO: HHH000021: Bytecode provider name : javassist 这怎么解决啊
把这个Students.hbm.xml 配置文件放到src目录下,不要放到那个default包下!!!
<mapping resource="Students.hbm.xml" />
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver </property> <property name="hibernate.connection.username">root </property> <property name="hibernate.connection.password">root </property> <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/imocc?useUnicode=true&characterEncoding=utf-8</property> <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect </property> <property name="hibernate.show_sql">true </property> <property name="hibernate.format_sql">true </property> <property name="hibernate.hbm2ddl.auto">create </property> <mapping/ resource="Students.hbm.xml"> </session-factory> </hibernate-configuration>
Hibernate初探之单表映射
74810 学习 · 793 问题
相似问题