查看Springboot默认配置版本
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.5.RELEASE</version>
<relativePath/>
</parent>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.3.5.RELEASE</version>
</parent>
yml配置格式
server:
port: 1123
spring:
datasource:
username: root
password: 123456
url: jdbc:mysql://localhost:3306/crud?useUnicode=true&serverTimezone=UTC&characterEncoding=utf8
driver-class-name: com.mysql.cj.jdbc.Driver
mybatis:
type-aliases-package: com.lyc.pojo
mapper-locations: classpath:static/mybatis/mapper/*.xml