时间:2021-07-01 10:21:17 帮助过:56人阅读
#===============================数据库相关====================================== #数据库驱动(可以自动识别) #spring.datasource.driver-class-name=com.mysql.jdbc.Driver spring.datasource.url=jdbc:mysql://localhost:3306/databaseName?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC spring.datasource.username=username spring.datasource.password=password #修改数据源(com.zaxxer.hikari.HikariDataSource) spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
useUnicode=true&characterEncoding=UTF-8:防止中文乱码
serverTimezone=UTC:设置时间,UTC是世界标准时间
未设置时间报数据库连接错误:The server time zone value ‘?й???????‘ is unrecognized or represents more than one time zone. You must configure either the server or JDBC driver (via the serverTimezone configuration
@MapperScan("mapper包路径")
SpringBoot整合Mybatis访问数据库和阿里巴巴数据源
标签:cti The har jdbc cto uid 引入 === color