SpringBoot 整合SSM(一):思路

我一开始认为挺简单的,直到我到现在搭完。。。

其实这个最快能运行起来的springboot是确实比较早,就是在ssm整合完的那个晚上,不过后来又踩了些坑。

先说步骤:

2018年5月16日18:07:23

这两天写spring boot 整合SSM

我一开始觉得应该还不难吧,没想到还是踩了几天坑。。。
这次的目的还是一样,各个功能都有所实现。

step1:创建项目,spring starer 这个就找了我半天,eclipse里面。。

step2:修改application.properties
step2.1 添加datasource信息
step2.2 添加mybatis信息
step2.3 添加字符编码信息

step3:编写后台相关文件
step3.1 bean
step3.2 dao
step3.3 service
step3.4 conbtroller
step3.5 mapper.xml

step4:编写前台页面
step4.1 index.html
step4.2 welcome.html
step4.3 err.html

step5:异常、切面,这些都和注释开发的一样,只是这次切面我加了点东西,其实是一样的

step6:拦截器
step6.1 自定义拦截器类
step6.2 重写WebMvcConfigurer类,配置拦截器规则

猜你喜欢

转载自blog.csdn.net/wzlhlhhh/article/details/80341000