1.参考《gradle构建基本的java工程》构建工程
2.导入工程到eclipse中
3.配置tomcat配置,使基本的web工程能跑起来
4.正题,整合
(1)在WEB-INF下创建web.xml基本web文件
(2)在<web-app>下添加spring配置和spring监听器,指定spring的配置文件

(3)添加spring mvc的入口servlet

(4)在工程src/main/resource目录下建相应的applicationContext.xml和spring-mvc.xml文件

(5)配置扫描controller的包路径
(6)开启注解
(7)定义视图解析器

参考
github:https://github.com/xinxin321198/gradleLeaning
gitbub:https://github.com/xinxin321198/loserStar-SSM
网友评论