SSH三大框架需要的配置文件
生活随笔
收集整理的這篇文章主要介紹了
SSH三大框架需要的配置文件
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
1. Struts2框架
* 在web.xml中配置核心的過濾器
<filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class> </filter> <filter-mapping> <filter-name>struts2</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
* 在src目錄下創建struts.xml,用來配置Action
2. Hibernate框架
* 在src目錄創建hibernate.cfg.xml配置文件
* 在JavaBean所在的包下映射的配置文件
3. Spring框架
* 在web.xml配置整合WEB的監聽器
<listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:applicationContext.xml</param-value> </context-param>
* 在src目錄下創建applicationContext.xml
* 在src目錄下log4j.proerties
總結
以上是生活随笔為你收集整理的SSH三大框架需要的配置文件的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: fpm制作mysql rpm包_FPM简
- 下一篇: Jetpack Compose学习(7)