# 应用名称
spring.application.name=hello_mybatis
#下面这些内容是为了让MyBatis映射
#指定Mybatis的Mapper文件
mybatis.mapper-locations=classpath:mappers/*xml
#指定Mybatis的实体目录
mybatis.type-aliases-package=cn.edu.neu.hello_mybatis.entity
# 数据库驱动:
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
# 数据源名称
spring.datasource.name=defaultDataSource
# 数据库连接地址
spring.datasource.url=jdbc:mysql://localhost:3306/mychina?serverTimezone=UTC
spring.datasource.username=root
spring.datasource.password=
yml
server:
port: 8080
// 配置swagger
spring:
mvc:
path match:
:matching-strategy: ant_path_matcher
// 连接数据库
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/background?serverTimezone=UTC
username: root
password:
mybatis:
mapper-locations: classpath:mapper/*xml #扫描所有mybatis的xml文件
configuration:
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl #在控制台打印sql语句
type-aliases-package: com.duxiang.backgroundmanagement.entity