“Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLException: url not set”
“Caused by: java.sql.SQLException: url not set”
问题原因:启动类中使用了@Bean以及@ConfigurationProperties(prefix = "data-source")中的prefix参数和application.xml配置文件中的不一致
解决方案:注释两个注解及其相关代码或者注释掉@Bean或者修改prefix的参数和application.xml配置文件中的一致