数据库1045错误,是密码或者用户名错误。原因:使用了spring,配置文件中的username不能叫username,spring会默认username是你的计算机名 解决办法:把username改个名字即可,或在每个配置信息前面加上 jdbc. 即可(jdbc.username)