1、test is not an annotation type 类名也叫Test,冲突,更改类名即可 2、org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: Access denied for user ‘yangshuijiao’@‘59.49.78.118’ (using password: YES) spring默认加载系统使用的环境变量,在spring.xml配置数据库用户名时, 实际加载的时当前计算机的名称。 所以配置数据源时。用户名不能叫username