没想到竟然只是因为 Druid.properties中的数据库用户名用了username:root spring.xnl 中读取username 使用${username}取值 ,但是这个取值默认为是取当前系统的用户名 也就是Administrator 是你的电脑用户名 所以连接不上很正常!http://blog.youkuaiyun.com/yuan882696yan/article/details/77345374