Spring-Boot环境的快速搭建

1、Spring Initializr

2、起包和项目名

3、选相关依赖

4、properties文件:

server.port=1515
server.servlet.context-path=/ems
spring.resources.static-locations=classpath:/templates/,classpath:/static/

spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/ssm?serverTimezone=GMT%2B8
spring.datasource.username=root
spring.datasource.password=123

mybatis.mapper-locations=classpath:mapper/*.xml
mybatis.type-aliases-package=com.mj.entity

5、入口类加 @mapperScan(com/xx/dao) //扫描dao接口

上一篇:JS埋点 小结


下一篇:IDEA Springboot启动报Command line is too long错误