properties文件配置数据源用username和password报错
在spring整合mybatis时,配置数据源时,采用的是加载properties文件配置的,其中username配置的是:username=root,然后启动项目后如下错误: Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Cannot create PoolableConnectionFactory (Access denied for user 'Administrator'@'localhost' (using password: YES))] with root cause。
然后将username和password打印出来,结果username变成了Administrator,密码是正确的,所以导致了错误,解决方法将username名字改下就行,可是不知道为什么?求解!!!