码迷,mamicode.com
首页 > 编程语言 > 详细

SpringMVC+Spring+mybatis 项目实践

时间:2020-06-21 13:26:24      阅读:50      评论:0      收藏:0      [点我收藏+]

标签:ring   ali   height   zone   ica   password   vertica   cte   border   

ssm+spring+mybatis实战

小组成员:

龙继平201731062131

王阳:201731041215

1、我采用springboot做项目。因为springboot继承ssm。更加容易,不容易出现配置问题。

2、在idea中新建一个springboot项目。

3、application.properties中配置环境。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
server.port=8080
spring.datasource.url=jdbc:mysql://localhost:3306/javaee?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT
spring.datasource.username=root
spring.datasource.password=root
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
#配置视图解析
spring.mvc.view.prefix=/templates/
spring.mvc.view.suffix=.html
server.error.path=/error.html
#启用缓存
spring.thymeleaf.cache=true
#开启热部署
spring.devtools.restart.enabled=true
#监听目录
spring.devtools.restart.additional-paths=src/main/java
#配置mybatis
mybatis.mapper-locations=classpath:Mybatis/mapper/*.xml
mybatis.config-location=classpath:Mybatis/Mybatis-config.xml
mybatis.type-aliases-package=com.example.demo.entity

 4、在启动类上面配置mybatis的mapper扫描。和过滤器扫描

技术图片

 

 

5、对代码进行修改。改bug。

6、由于我们小组原来项目就是采用的springboot整合ssm开发的,整合过程我就不详细写了。开发过程见以下博文

https://www.cnblogs.com/l123456l/p/13167637.html

https://www.cnblogs.com/l123456l/p/13086735.html

https://www.cnblogs.com/l123456l/p/12971506.html

 7、github地址:

https://github.com/JPL1988/demo

SpringMVC+Spring+mybatis 项目实践

标签:ring   ali   height   zone   ica   password   vertica   cte   border   

原文地址:https://www.cnblogs.com/SW-P-WY/p/13172148.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!