輸入賬號密碼后按登陸出現(xiàn)404搞了一天~,后面把struts.xml里的class="action.{1}Action"改為class="{1}Action.action"就能運(yùn)行了~
2017-05-23
樓下這些說什么復(fù)制粘貼的不要講之類的,先去了解struts框架、hibernate的基礎(chǔ)知識再來學(xué)啊,你學(xué)過后會(huì)發(fā)現(xiàn)這些是很簡單的。
2017-05-23
<property name="hibernate.connection.url">
<![CDATA[
jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf8
]]>
</property> 此舉解決編碼問題
<![CDATA[
jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf8
]]>
</property> 此舉解決編碼問題
2017-05-22
出異常不應(yīng)該是回滾嗎 tx.rollback()
myeclipse2015環(huán)境,Struts2,Hibernate4,修改了老師代碼中不能用的Hibernate語法,代碼在下面
http://www.bufferoverflow.cn/index.php/2017/05/20/struts2hibernate4-demo/
http://www.bufferoverflow.cn/index.php/2017/05/20/struts2hibernate4-demo/
2017-05-20
在hibernate.cfg.xml 那里方言估計(jì)要改成<property name="dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>
2017-05-20
創(chuàng)建注冊對象那里,hibernate5.xx以上的現(xiàn)在用這個(gè)
//服務(wù)注冊對象
ServiceRegistry serviceRegistry = new StandardServiceRegistryBuilder().applySettings(config.getProperties()).build();
//服務(wù)注冊對象
ServiceRegistry serviceRegistry = new StandardServiceRegistryBuilder().applySettings(config.getProperties()).build();
2017-05-18
在用Query保存hql查詢的結(jié)果時(shí),javax.presistent.jar和hibernate.jar沖突,Query的jar包只能添加herbinate.query.Query.jar報(bào)錯(cuò)了。
2017-05-14