跟着老师配置一步一步来,application-dev.yml配置如下
server: port: 8081 servlet: context-path: /luckymoney limit: minMoney: 0.01 maxMoney: 9999 description: 最少要发${limit.minMoney}元,最多要发${limit.maxMoney}元 spring: datasource: driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://localhost:3306/luckymoney username: root password: 0625 jpa: hibernate: ddl-auto: create show-sql: true
2. 使用navicat建立数据库luckymoney
3. 运行程序还是出现报错如下:
4.
ERROR 11916 --- [ main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Exception during pool initialization.
5.
java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: YES)
pardon110