项目的resources根目录下有一个application.yml
server:
port: 8081
spring:
datasource:
url: jdbc:mysql://localhost:3306/crowd?useUnicode=true&characterEncoding=utf-8&serverTimezone=GMT%2B8
username: root
password: 123456
# 可以不配置,根据url自动识别,建议配置
driver-class-name: com.mysql.cj.jdbc.Driver
###################以下为druid增加的配置###########################
type: com.alibaba.druid.pool.DruidDataSource
# 初始化连接池个数
initialSize: 5
# 最大连接池个数
maxActive: 20
mybatis:
mapper-locations: classpath:mybatis/mappers/*.xml
type-aliases-package: com.atguigu.crowd.entity