SSM整合 使用db.properties 报错:
ERROR [Druid-ConnectionPool-Create-1115993747] - create connection SQLException
create connection SQLException, url: jdbc:mysql://localhost:3308/ssmbuild?useUnicode=true&charsetEncoding=UTF-8, errorCode 1045, state 28000
java.sql.SQLException: Access denied for user 'Z'@'localhost' (using password: YES)
使用了spring,配置文件(db.properties)中的username不能叫username
spring会默认username是你的计算机名
解决办法:
将username改个名字(user、jdbc.username等等)
不为username即可