请问楼上是用什么开发的,我是用myeclipse的你的业务类里具体方法怎么写的,也和我一样么。。

解决方案 »

  1.   

    事实就是需要重启,所以肯定在session这块有问题了
      

  2.   

    <hibernate-configuration><session-factory>
    <property name="connection.username">test</property>
    <property name="connection.url">
    jdbc:mysql://192.168.1.28:3306/task?characterEncoding=utf-8
    </property>
    <property name="dialect">
    org.hibernate.dialect.MySQLDialect
    </property>
    <property name="myeclipse.connection.profile">mysqlcon</property>
    <property name="connection.password">test</property>
    <property name="connection.driver_class">
    com.mysql.jdbc.Driver
    </property>
    <property name="show_sql">true</property>
    <mapping resource="mapping/Tasklist.hbm.xml" />
    <mapping resource="mapping/Planlist.hbm.xml" />
    <mapping resource="mapping/Admin.hbm.xml" />
    <mapping resource="mapping/Employees.hbm.xml" />
    <mapping resource="mapping/Manager.hbm.xml" />
    </session-factory></hibernate-configuration>这是hiernate的配置文件,不知道默认是开还是关的...