配置 Spring JdbcTemplate

最近在配置 Spring JdbcTemplate中会发现下面的错误

Exception in thread "main" org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class(/这里除了class还有其它类型):

网上查过一些外文帖子,了解到是JDK版本的兼容性的问题,这里只要把JDK版本调到1.7就可以顺利解决问题了

还有一个情况就是java.sql.SQLException: Access denied for user 'xxx'@'localhost' (using password: YES),通过查找网上相关资料,最后解决的办法是要保持jdbc.properties和xml文件中获取的一样,如下图中框内圈起来的部分。


猜你喜欢

转载自blog.csdn.net/du5006150054/article/details/81027647
今日推荐