server:
port: 9999
spring:
datasource:
type: com.mysql.cj.jdbc.MysqlDataSource
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://127.0.0.1:3306/testdb?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&serverTimezone=Hongkong
password: "0000"
username: xin
mybatis:
mapperLocations: classpath:mapper/*.xml
typeAliasesPackage: com.wx.mybatistest.entity
话不多说,如果你数据库登录密码是数字的话,请记住!一定要! 在两面加上双引号!!!引号!!!号!!!
不加的话会报:
### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: Access denied for user 'xin'@'localhost' (using password: YES)] with root cause
java.sql.SQLException: Access denied for user 'xin'@'localhost' (using password: YES)
完全不懂!不懂!不懂!!!!!!!!!!!!!
就这样丢掉了一天!一天!天!!!!!!!!!