常用
使用properties编写
server.port=80
server.servlet.context-path=/myspring
logging.file=e:/myspringboot.log
#记录日志的级别
#debug->info->warn->error->fatal
logging.level.root=info
#自动调整为debug
#debug=true
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url=jdbc:mysql//localhost:3306/***
spring.datasource.username=root
spring.datasource.password=12345678
使用yml编写
#debug: true
logging:
level:
root: info
file: e:/myspringboot.log
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url:
password:
data-username:
详细说明https://www.cnblogs.com/shamo89/p/8178109.html