tomcat有个地方出现了这个警告:...
警告: No configuration found. Configuring ehcache from ehcache-failsafe.xml foun
d in the classpath: jar:file:E:/Tomcat 4.1/common/lib/ehcache-1.1.jar!/ehcache-f
ailsafe.xml
...
警告: No configuration found. Configuring ehcache from ehcache-failsafe.xml foun
d in the classpath: jar:file:E:/Tomcat 4.1/common/lib/ehcache-1.1.jar!/ehcache-f
ailsafe.xml
...
<generator class="assigned"/>
</id>
<id name="id">
<generator class="assigned"/>
</id>
这个说明是由数据库本身产生的ID(mysql,mssql),而你又想自己定义!
由于知识有限具体是什么问题,小弟看不出来呢!帮你顶下
SessionFactory factory;
factory = new Configuration().configure().buildSessionFactory();
Area area = new Area();
//area.setId(8);
area.setArea_name("chongqing");
Session session1 = factory.openSession();
session1.save(area);