yaml

server:
port: 8080

spring:
datasource:
type: com.alibaba.druid.pool.DruidDataSource
druid:
username: root
password: 123456
url: jdbc:mysql://localhost:3306/springshop?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
driver-class-name: com.mysql.cj.jdbc.Driver
# initial-size: 5
# max_active: 20
# min-idle: 3
# max-wait: 6000
# #配置过滤器
# #监测数据库性能
# #可选:logi4j2(异步日志) slf4j logback
# filters: stat,wall,slf4j2
# #监测配置(运维开发相关)
# web-stat-filter:
# enabled: true
# url-pattern: /*
# #前后端分离需要配置 "/druid/*"
# #前后端不分离需要配置下面的属性
# exclusions: "*.js,*.css,*.gif,*.jpg,*.png,*.ico,/druid/*"
#
# stat-view-servlet:
# enabled: true
# url-pattern: /druid/*
# login-password: admin
# login-username: admin




#自定义属性 官方没有提供starter需使用自定义属性

mybatis:
# 注册所有的 mapper.xml
mapper-locations: "classpath:mapper/**/*.xml"
configuration:
log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl
# 配置mapper.xml 文件中的类的前缀
type-aliases-package: com.jj.springshop.pojo.entity
# mybatis 的核心配置
# config-location: classpath: mybatis-config.xml


posted @ 2021-10-14 20:17  吴大叔  阅读(109)  评论(0编辑  收藏  举报