我正在执行多个数据源热更新配置数据错误无法执行。
@RefreshScope
@Configuration
@MapperScan(basePackages = DruidCrmDBConfig.PACKAGE,sqlSessionFactoryRef = DruidCrmDBConfig.NAME+"SessionFactory")
public class DruidCrmDBConfig {
...
@RefreshScope
@Bean(name=NAME+"DataSource") //声明其为Bean实例
// @ConfigurationProperties(prefix = "spring."+NAME)
public DataSource dataSource(){
DruidDataSource datasource = new DruidDataSource();
datasource.setUrl(this.dbUrl);
...
}
}
Cannot determine embedded database driver class for database type NONE
Action:
If you want an embedded database please put a supported one on the classpath. If you have database settings to be loaded from a particular profile you may need to active it (the profiles "prod" are currently active).