springboot配置文件

server:
port: 8001 //端口号
spring:
datasource:
## MySQL
username:xxxx //数据库账号
password:xxxx  //数据库密码
url: jdbc:mysql://数据库的地址:3306/数据库名?useAffectedRows=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&allowMultiQueries=true
driver-class-name: com.mysql.cj.jdbc.Driver  //数据库驱动

mybatis:
mapper-locations: classpath:mapping/*.xml //xml路径




useAffectedRows=true&useUnicode=true&characterEncoding=utf8  //这个代表允许用户自己设定数据库编码,而且设置成UTF-8
serverTimezone=GMT%2B8  //时区设置
allowMultiQueries=true  //实现批量操作

 

posted @ 2022-05-07 13:05  "月亮先生"  阅读(21)  评论(0)    收藏  举报