三大框架整合

1.整合思想

  • web 层 -> struts2
  • service 层 -> Spring
  • dao 层 -> Hibernate
    整合就是两两整合,struts 和 spring 整合,然后 spring 和 hibernate 整合。
  • struts 和 spring 整合就是 action 需要的 service 直接通过 spring 实例化并且注入到 action 中
  • spring 和 hibernate 整合就是把 sessionFactory 放在 spring 中管理,然后把 dao 注入到 service 中

Powered by Hexo and Hexo-theme-hiker

Copyright © 2015 - 2021 昨夜凛雨 All Rights Reserved.

UV : | PV :