Springcloud множественный источник данных @RefreshScope ошибка - PullRequest
0 голосов
/ 03 мая 2018

Я выполняю несколько источников данных: горячее обновление: ошибка в данных конфигурации не может быть выполнена *

@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).
...