spring:
application:
name: user-center
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/scheduling
username: root
password: 123456
server:
port: 8080
mybatis-plus:
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
map-underscore-to-camel-case: true
更改后
spring:
application:
name: user-center
# DataSource Config
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/usercenter
username: root
password: 123456
server:
port: 8080
mybatis-plus:
configuration:
map-underscore-to-camel-case: false
配置的时候,错将datasource放在了application的下一级,所以运行时,检测不出datasource下配置的所有东西。(我找了很长时间的报错,没想到就出现在这个很小的细节上,警钟长鸣)
标签:cj,jdbc,name,配置,application,datasource,mysql,yml From: https://www.cnblogs.com/ysk0904/p/17653767.html