1、创建配置文件,application.yaml
2、在配置文件中配置:
# 服务端口
server:
port: 8001
# 服务名
spring:
application:
name: service-edu
# 环境设置:dev、test、prod
profiles:
active: dev
# mysql数据库连接
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/guli?serverTimezone=GMT%2B8
username: root
password: 941941
#mybatis日志
mybatis-plus:
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl