JDBCTEMPLATE无法加载
idea报错:
***************************
APPLICATION FAILED TO START
***************************
Description:
Field jdbcTemplate_bidata in cn.zup.bi.service.impl.BIDimServiceImpl required a bean of type 'org.springframework.jdbc.core.JdbcTemplate' that could not be found.
- Bean method 'jdbcTemplate' not loaded because @ConditionalOnSingleCandidate (types: javax.sql.DataSource; SearchStrategy: all) did not find a primary bean from beans 'rbacmapDataSource', 'biDataSource'
Action:
Consider revisiting the conditions above or defining a bean of type 'org.springframework.jdbc.core.JdbcTemplate' in your configuration.
Disconnected from the target VM, address: '127.0.0.1:65481', transport: 'socket'
Process finished with exit code 1
- 首先依赖报错
且多次进行clean和install也无用
2.在resource目录下新建lib文件夹
将一直报错的jar包拷贝至lib文件夹下
修改pom.xml文件中的配置
目录为刚才放jar包的目录,然后重新rebuild一下就好了!