本文共 2583 字,大约阅读时间需要 8 分钟。
Spring Boot yml配置文件:
server: port: 端口号 servlet: context-path: /spring: datasource: url: jdbc:mysql:///数据库名?serverTimezone=GMT%2B8&charactEncoding=编码类型 username: 数据库用户名 password: 数据库密码 thymeleaf: prefix: classpath:页面地址 cache: 缓存(开发环境false,生产环境true)mybatis: configuration: default-statement-timeout: 60 map-underscore-to-camel-case: true mapper-locations: - classpath:Mapper文件的路径logging: level: com.cy: 日志等级
POM文件:
4.0.0 org.springframework.boot spring-boot-starter-parent 2.3.1.RELEASE 组名 名称 0.0.1-SNAPSHOT 名称 描述 JDK版本 org.springframework.boot spring-boot-starter-actuator org.springframework.boot spring-boot-starter-jdbc org.springframework.boot spring-boot-starter-thymeleaf org.springframework.boot spring-boot-starter-web org.mybatis.spring.boot mybatis-spring-boot-starter 2.1.2 org.springframework.boot spring-boot-devtools runtime true mysql mysql-connector-java runtime org.projectlombok lombok true org.springframework.boot spring-boot-starter-test test org.junit.vintage junit-vintage-engine org.springframework.boot spring-boot-maven-plugin
转载地址:http://fbmmi.baihongyu.com/