MySQL连接信息

一、MySQL8.x的连接信息

db.url= jdbc:mysql://localhost:3306/spring_jdbctemplate?characterEncoding=utf8&useSSL=false&serverTimezone=UTC&rewriteBatchedStatements=true
db.driver=com.mysql.jdbc.Driver
db.username=root
db.password=123456

 二、application.yml连接mysql

 1 spring:
 2   datasource:
 3     url: jdbc:mysql://localhost:3306/db20220115_springboot_mybatis?characterEncoding=utf8&useSSL=false&serverTimezone=UTC&rewriteBatchedStatements=true
 4     type: com.alibaba.druid.pool.DruidDataSource
 5     username: root
 6     password: 123456
 7 
 8 mybatis:
 9   mapper-locations: classpath*:/mappers/**/*.xml
10   type-aliases-package: com.moon.springboot.entity
11   configuration:
12     map-underscore-to-camel-case: true
13 
14 logging:
15   level:
16     com.moon.springboot.mapper: DEBUG

 

posted @ 2022-01-11 11:58  谁怕?一蓑烟雨任平生  阅读(116)  评论(0)    收藏  举报