首页 > 代码库 > 重温SSH整合项目

重温SSH整合项目

1.由spring处理的路径就可以带classpath:

2.在<tx:advice id="advice" transaction-manager="transactionManager">中别忘加transactionManager,不加也会自动带

3.页面上提示no Session 时的处理方式:

  01.在hbm.xml配置文件中lazy为false

  02.在dao中执行查询时使用迫切左外连接

  03.使用OpenSessionInViewFilter

4.action,service,dao以及struts.xml中最好分别以处理的对象区分开来

5.在hbm.xml中配置时最好不要带fetch="join"而在dao中自己加

重温SSH整合项目