No qualifying bean of type 'javax.sql.DataSource' available: expected at least 1

No qualifying bean of type 'javax.sql.DataSource' available: expected at least 1 bean which qualifies as autowire candidate.


No qualifying bean of type 'javax.sql.DataSource' available: expected at least 1_第1张图片


原因使用了默认的DataSource,但在Application中添加了 (exclude= {DataSourceAutoConfiguration. class }),去掉即可


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/10314474/viewspace-2200345/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/10314474/viewspace-2200345/

你可能感兴趣的:(测试)