编辑
在我们的yml文件中URL一定要与数据库中的URL保持一致,注意要进行测试连接,成功后才算配置数据库成功。
spring:
application:
name: reggietake
datasource:
url: jdbc:mysql://localhost:3306/reggie
username: root
password: 123456
driver-class-name: com.mysql.cj.jdbc.Driver
sql:
init:
mode: never # 禁用SQL初始化
continue-on-error: false
mybatis-plus:
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
map-underscore-to-camel-case: true
global-config:
db-config:
id-type: ASSIGN_ID
aliyun:
oss:
endpoint: https://oss-cn-hangzhou.aliyuncs.com
accessKeyId: LTAI5tP4Y67w4QaQWX3zc4oH
accessKeySecret: DNA4MT6caay3U81wIelTLgEUPxJz6S
bucketName: web-tainzi
#spring事务管理日志
logging:
level:
org.springframework.jdbc.support.JdbcTransactionManager: debug