自动化部署:
start.spring.io 可以自己动生成Spring脚手架。也可以新建,有选项可选
springBoot提供了统一的环境。通过配置文件可修改默认配置
部署服务器时:
这种部署:简化配置,方便运维。批量开关服务器。更适合做微服务
其他的:就比较麻烦了
@RequestMapping 注解
Jrebel热部署
简单的小项目springboot. 可以存储展示输入的名字
spring.datasource.url=jdbc:mysql://localhost:3306/ssm?characterEncoding=utf8&useSSL=false&serverTimezone=UTC
##数据库用户名
spring.datasource.username=root
##数据库密码
spring.datasource.password=840416
# 用来实例化mapper接口
mybatis.type-aliases-package=com.mashibing.springboot.mapper
# 对应的sql映射
mybatis.mapper-locations=classpath:mybatis/mapper/*.xml
@MapperScan("com.mashibing.springboot.mapper")
每一个mapper接口上加入
@Mapper
MyBatis Generator
依赖
<!-- https://mvnrepository.com/artifact/com.github.pagehelper/pagehelper-spring-boot-starter -->
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>1.2.12</version>
</dependency>
原文:https://www.cnblogs.com/dadafan/p/14741853.html