# 服务器端口的配置
server:
port: 8081
servlet:
context-path: / # 映射路径的配置
# 数据源的配置
spring:
datasource:
url: jdbc:mysql://localhost:3306/jtdb?serverTimezone=UTC
driver-class-name: com.mysql.cj.jdbc.Driver
data-username: root
data-password: root
# 应用名称的配置
application:
name: springboot
# mybatis的配置
mybatis:
mapper-locations: mappers/**/*.xml
type-aliases-package: com.tedu.pojo
configuration:
map-underscore-to-camel-case: true
# logging日志记录的配置需要在level: 的后面写上包名:那个包下的内容需要日志记录。
# 如果为root: 表示所有的包的内容都会进行日志的记录
# 一般情况下我们只需要输出数据库包下的日志就可以啦。。1
logging:
level:
com:
tedu:
mapper: debug
# 环境的切换
spring:
profiles:
active: test
# aop:
# auto: true # 开启使用aop 本来默认就是开启的
# proxy-target-class: true # 是否启用Cglib动态代理
springboot的yml配置
最新推荐文章于 2024-05-25 17:46:25 发布