首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >Spring boot v 2.1.8 的多数据源配置问题?

Spring boot v 2.1.8 的多数据源配置问题?

提问于 2019-02-14 12:03:22
回答 0关注 0查看 6.1K

配置 代码:

package com.xy.bist.config;

import org.springframework.batch.core.configuration.annotation.EnableBatchProcessing;

import org.springframework.beans.factory.annotation.Qualifier;

import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;

import org.springframework.boot.context.properties.ConfigurationProperties;

import org.springframework.context.annotation.Bean;

import org.springframework.context.annotation.ComponentScan;

import org.springframework.context.annotation.Configuration;

import org.springframework.context.annotation.Primary;

import org.springframework.jdbc.core.JdbcTemplate;

import com.xy.bist.component.MyBatchConfigurer;

import com.zaxxer.hikari.HikariDataSource;

@Configuration

@EnableBatchProcessing

@ComponentScan(basePackageClasses = MyBatchConfigurer.class)

public class DataSourceConfig {

@Bean

@Primary

@ConfigurationProperties("spring.datasource.master")

public DataSourceProperties firstDataSourceProperties() {

return new DataSourceProperties();

}

@Bean(name = "master")

@Primary

@ConfigurationProperties(prefix = "spring.datasource.master")

public HikariDataSource primaryDataSource() {

return firstDataSourceProperties().initializeDataSourceBuilder().type(HikariDataSource.class).build();

}

@Bean

@ConfigurationProperties("spring.datasource.slave")

public DataSourceProperties secondarytDataSourceProperties() {

return new DataSourceProperties();

}

@Bean(name = "slave")

@ConfigurationProperties(prefix = "spring.datasource.slave")

public HikariDataSource secondaryDataSource() {

return secondarytDataSourceProperties().initializeDataSourceBuilder().type(HikariDataSource.class).build();

}

@Bean(name = "masterJdbcTemplate")

@Primary

public JdbcTemplate originalJdbcTemplate(@Qualifier("master") HikariDataSource datasurce) {

return new JdbcTemplate(datasurce);

}

@Bean(name = "slaveJdbcTemplate")

public JdbcTemplate destJdbcTemplate(@Qualifier("slave") HikariDataSource datasurce) {

return new JdbcTemplate(datasurce);

}

/* @Bean

BatchConfigurer configurer(@Qualifier("master") HikariDataSource dataSource) {

return new MyBatchConfigurer(dataSource);

}*/

}

运行控制台:

2019-02-14 11:52:46.289 INFO 7936 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable

2019-02-14 11:52:46.654 INFO 7936 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.retry.annotation.RetryConfiguration' of type [org.springframework.retry.annotation.RetryConfiguration$$EnhancerBySpringCGLIB$$67fcc5d3] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2019-02-14 11:52:46.661 INFO 7936 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$8e5330ab] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

. ____ _ __ _ _

/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \

( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \

\\/ ___)| |_)| | | | | || (_| | ) ) ) )

' |____| .__|_| |_|_| |_\__, | / / / /

=========|_|==============|___/=/_/_/_/

:: Spring Boot :: (v2.1.2.RELEASE)

2019-02-14 11:52:48.555 INFO 7936 --- [ restartedMain] b.c.PropertySourceBootstrapConfiguration : Located property source: CompositePropertySource {name='consul', propertySources=[ConsulPropertySource {name='config/bisTest,test/'}, ConsulPropertySource {name='config/bisTest/'}, ConsulPropertySource {name='config/application,test/'}, ConsulPropertySource {name='config/application/'}]}

2019-02-14 11:52:48.558 INFO 7936 --- [ restartedMain] com.xy.bist.BistApplication : The following profiles are active: test

2019-02-14 11:52:49.836 INFO 7936 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!

2019-02-14 11:52:49.836 INFO 7936 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode.

2019-02-14 11:52:49.888 INFO 7936 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 46ms. Found 1 repository interfaces.

2019-02-14 11:52:49.890 INFO 7936 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!

2019-02-14 11:52:49.890 INFO 7936 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode.

2019-02-14 11:52:49.897 INFO 7936 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 7ms. Found 1 repository interfaces.

2019-02-14 11:52:50.385 INFO 7936 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!

2019-02-14 11:52:50.386 INFO 7936 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode.

2019-02-14 11:52:50.404 INFO 7936 --- [ restartedMain] .RepositoryConfigurationExtensionSupport : Spring Data Reactive MongoDB - Could not safely identify store assignment for repository candidate interface com.xy.bist.dao.m.AdminDao.

2019-02-14 11:52:50.405 INFO 7936 --- [ restartedMain] .RepositoryConfigurationExtensionSupport : Spring Data Reactive MongoDB - Could not safely identify store assignment for repository candidate interface com.xy.bist.dao.s.PaymentDao.

2019-02-14 11:52:50.405 INFO 7936 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 19ms. Found 0 repository interfaces.

2019-02-14 11:52:50.409 INFO 7936 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!

2019-02-14 11:52:50.409 INFO 7936 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode.

2019-02-14 11:52:50.416 INFO 7936 --- [ restartedMain] .RepositoryConfigurationExtensionSupport : Spring Data MongoDB - Could not safely identify store assignment for repository candidate interface com.xy.bist.dao.m.AdminDao.

2019-02-14 11:52:50.416 INFO 7936 --- [ restartedMain] .RepositoryConfigurationExtensionSupport : Spring Data MongoDB - Could not safely identify store assignment for repository candidate interface com.xy.bist.dao.s.PaymentDao.

2019-02-14 11:52:50.416 INFO 7936 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 7ms. Found 0 repository interfaces.

2019-02-14 11:52:50.425 INFO 7936 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!

2019-02-14 11:52:50.426 INFO 7936 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode.

2019-02-14 11:52:50.439 INFO 7936 --- [ restartedMain] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface com.xy.bist.dao.m.AdminDao.

2019-02-14 11:52:50.440 INFO 7936 --- [ restartedMain] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface com.xy.bist.dao.s.PaymentDao.

2019-02-14 11:52:50.440 INFO 7936 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 8ms. Found 0 repository interfaces.

2019-02-14 11:52:50.628 WARN 7936 --- [ restartedMain] o.s.boot.actuate.endpoint.EndpointId : Endpoint ID 'service-registry' contains invalid characters, please migrate to a valid format.

2019-02-14 11:52:50.896 INFO 7936 --- [ restartedMain] o.s.cloud.context.scope.GenericScope : BeanFactory id=6fd1fd15-d8c6-3e9b-818b-a2fdc8139552

2019-02-14 11:52:50.917 INFO 7936 --- [ restartedMain] faultConfiguringBeanFactoryPostProcessor : No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created.

2019-02-14 11:52:50.923 INFO 7936 --- [ restartedMain] faultConfiguringBeanFactoryPostProcessor : No bean named 'taskScheduler' has been explicitly defined. Therefore, a default ThreadPoolTaskScheduler will be created.

2019-02-14 11:52:50.931 INFO 7936 --- [ restartedMain] faultConfiguringBeanFactoryPostProcessor : No bean named 'integrationHeaderChannelRegistry' has been explicitly defined. Therefore, a default DefaultHeaderChannelRegistry will be created.

2019-02-14 11:52:50.955 INFO 7936 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.amqp.rabbit.annotation.RabbitBootstrapConfiguration' of type [org.springframework.amqp.rabbit.annotation.RabbitBootstrapConfiguration$$EnhancerBySpringCGLIB$$38a4ebdc] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2019-02-14 11:52:50.979 INFO 7936 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.ws.config.annotation.DelegatingWsConfiguration' of type [org.springframework.ws.config.annotation.DelegatingWsConfiguration$$EnhancerBySpringCGLIB$$16d0f2ad] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2019-02-14 11:52:50.999 INFO 7936 --- [ restartedMain] .w.s.a.s.AnnotationActionEndpointMapping : Supporting [WS-Addressing August 2004, WS-Addressing 1.0]

2019-02-14 11:52:51.017 INFO 7936 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.retry.annotation.RetryConfiguration' of type [org.springframework.retry.annotation.RetryConfiguration$$EnhancerBySpringCGLIB$$67fcc5d3] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2019-02-14 11:52:51.079 INFO 7936 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration' of type [org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration$$EnhancerBySpringCGLIB$$ae6f5e8] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2019-02-14 11:52:51.083 INFO 7936 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'objectPostProcessor' of type [org.springframework.security.config.annotation.configuration.AutowireBeanFactoryObjectPostProcessor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2019-02-14 11:52:51.088 INFO 7936 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler@2efba1d1' of type [org.springframework.security.oauth2.provider.expression.OAuth2MethodSecurityExpressionHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2019-02-14 11:52:51.093 INFO 7936 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration' of type [org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration$$EnhancerBySpringCGLIB$$2fbb989a] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2019-02-14 11:52:51.095 INFO 7936 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'methodSecurityMetadataSource' of type [org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2019-02-14 11:52:51.116 INFO 7936 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$72392dae] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2019-02-14 11:52:51.130 INFO 7936 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.integration.config.IntegrationManagementConfiguration' of type [org.springframework.integration.config.IntegrationManagementConfiguration$$EnhancerBySpringCGLIB$$dd2ae8dd] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2019-02-14 11:52:51.142 INFO 7936 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'integrationDisposableAutoCreatedBeans' of type [org.springframework.integration.config.annotation.Disposables] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2019-02-14 11:52:51.165 INFO 7936 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.hateoas.config.HateoasConfiguration' of type [org.springframework.hateoas.config.HateoasConfiguration$$EnhancerBySpringCGLIB$$f1b97ae0] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2019-02-14 11:52:51.173 INFO 7936 --- [ restartedMain] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$8e5330ab] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)

2019-02-14 11:52:51.852 INFO 7936 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)

2019-02-14 11:52:51.872 INFO 7936 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]

2019-02-14 11:52:51.872 INFO 7936 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.14]

2019-02-14 11:52:51.877 INFO 7936 --- [ restartedMain] o.a.catalina.core.AprLifecycleListener : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [D:\Program Files\Java\jre1.8.0_181\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;D:/Program Files/Java/jre1.8.0_181/bin/server;D:/Program Files/Java/jre1.8.0_181/bin;D:/Program Files/Java/jre1.8.0_181/lib/amd64;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;D:\phpStudy\php\php-7.0.12-nts;D:\composer;D:\svn\server\bin;C:\WINDOWS\System32\OpenSSH\;D:\Program Files\PuTTY\;D:\Program Files\Git\cmd;C:\Users\idmin\AppData\Local\Microsoft\WindowsApps;C:\Users\idmin\AppData\Roaming\Composer\vendor\bin;D:\Users\idmin\AppData\Local\Programs\Fiddler;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps;;C:\Users\idmin\Desktop;;.]

2019-02-14 11:52:52.058 INFO 7936 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext

2019-02-14 11:52:52.058 INFO 7936 --- [ restartedMain] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 3492 ms

2019-02-14 11:52:52.299 WARN 7936 --- [ restartedMain] c.n.c.sources.URLConfigurationSource : No URLs will be polled as dynamic configuration sources.

2019-02-14 11:52:52.299 INFO 7936 --- [ restartedMain] c.n.c.sources.URLConfigurationSource : To enable URLs as dynamic configuration sources, define System property archaius.configurationSource.additionalUrls or make config.properties available on classpath.

2019-02-14 11:52:52.309 INFO 7936 --- [ restartedMain] c.netflix.config.DynamicPropertyFactory : DynamicPropertyFactory is initialized with configuration sources: com.netflix.config.ConcurrentCompositeConfiguration@d2837a1

2019-02-14 11:52:54.457 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : note: noprealloc may hurt performance in many applications

2019-02-14 11:52:54.529 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:52:54.528+0800 I CONTROL [initandlisten] MongoDB starting : pid=8076 port=57487 dbpath=C:\Users\idmin\AppData\Local\Temp\embedmongo-db-83da309f-9de0-4c3e-851a-8a1441b5fbfc 64-bit host=DESKTOP-BILN4J0

2019-02-14 11:52:54.530 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:52:54.529+0800 I CONTROL [initandlisten] targetMinOS: Windows Vista/Windows Server 2008

2019-02-14 11:52:54.530 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:52:54.529+0800 I CONTROL [initandlisten] db version v3.5.5

2019-02-14 11:52:54.530 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:52:54.529+0800 I CONTROL [initandlisten] git version: 98515c812b6fa893613f063dae568ff8319cbfbd

2019-02-14 11:52:54.530 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:52:54.529+0800 I CONTROL [initandlisten] allocator: tcmalloc

2019-02-14 11:52:54.530 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:52:54.529+0800 I CONTROL [initandlisten] modules: none

2019-02-14 11:52:54.530 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:52:54.529+0800 I CONTROL [initandlisten] build environment:

2019-02-14 11:52:54.530 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:52:54.529+0800 I CONTROL [initandlisten] distarch: x86_64

2019-02-14 11:52:54.530 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:52:54.529+0800 I CONTROL [initandlisten] target_arch: x86_64

2019-02-14 11:52:54.530 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:52:54.529+0800 I CONTROL [initandlisten] options: { net: { bindIp: "127.0.0.1", http: { enabled: false }, port: 57487 }, security: { authorization: "disabled" }, storage: { dbPath: "C:\Users\idmin\AppData\Local\Temp\embedmongo-db-83da309f-9de0-4c3e-851a-8a1441b5fbfc", journal: { enabled: false }, mmapv1: { preallocDataFiles: false, smallFiles: true }, syncPeriodSecs: 0.0 } }

2019-02-14 11:52:54.531 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:52:54.531+0800 I STORAGE [initandlisten] wiredtiger_open config: create,cache_size=7602M,session_max=20000,eviction=(threads_min=4,threads_max=4),config_base=false,statistics=(fast),log=(enabled=true,archive=true,path=journal,compressor=snappy),file_manager=(close_idle_time=100000),checkpoint=(wait=0,log_size=2GB),statistics_log=(wait=0),verbose=(recovery_progress),,log=(enabled=false),

2019-02-14 11:52:54.894 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:52:54.894+0800 W STORAGE [initandlisten] Detected configuration for non-active storage engine mmapv1 when current storage engine is wiredTige

2019-02-14 11:52:54.894 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:52:54.894+0800 I CONTROL [initandlisten]

2019-02-14 11:52:54.894 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:52:54.894+0800 I CONTROL [initandlisten] ** NOTE: This is a development version (3.5.5) of MongoDB.

2019-02-14 11:52:54.894 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:52:54.894+0800 I CONTROL [initandlisten] ** Not recommended for production.

2019-02-14 11:52:54.894 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:52:54.894+0800 I CONTROL [initandlisten]

2019-02-14 11:52:55.557 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:52:55.558+0800 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory 'C:/Users/idmin/AppData/Local/Temp/embedmongo-db-83da309f-9de0-4c3e-851a-8a1441b5fbfc/diagnostic.data'

2019-02-14 11:52:55.892 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:52:55.892+0800 I INDEX [initandlisten] build index on: admin.system.version properties: { v: 2, key: { version: 1 }, name: "incompatible_with_version_32", ns: "admin.system.version" }

2019-02-14 11:52:55.893 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:52:55.892+0800 I INDEX [initandlisten] building index using bulk method; build may temporarily use up to 500 megabytes of RAM

2019-02-14 11:52:55.901 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:52:55.901+0800 I INDEX [initandlisten] build index done. scanned 0 total records. 0 secs

2019-02-14 11:52:55.904 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:52:55.904+0800 I COMMAND [initandlisten] setting featureCompatibilityVersion to 3.4

2019-02-14 11:52:55.905 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:52:55.906+0800 I NETWORK [thread1] waiting for connections on port 57487

2019-02-14 11:52:55.906 INFO 7936 --- [ restartedMain] d.f.embed.mongo.MongodExecutable : start de.flapdoodle.embed.mongo.config.MongodConfigBuilder$ImmutableMongodConfig@2b829f7e

2019-02-14 11:52:56.256 INFO 7936 --- [ restartedMain] org.mongodb.driver.cluster : Cluster created with settings {hosts=[localhost:57487], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500}

2019-02-14 11:52:56.360 INFO 7936 --- [ restartedMain] org.mongodb.driver.cluster : Cluster created with settings {hosts=[localhost:57487], mode=MULTIPLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500}

2019-02-14 11:52:56.360 INFO 7936 --- [ restartedMain] org.mongodb.driver.cluster : Adding discovered server localhost:57487 to client view of cluste

2019-02-14 11:52:56.363 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:52:56.363+0800 I NETWORK [thread1] connection accepted from 127.0.0.1:57513 #1 (1 connection now open)

2019-02-14 11:52:56.372 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:52:56.372+0800 I NETWORK [conn1] received client metadata from 127.0.0.1:57513 conn1: { driver: { name: "mongo-java-driver", version: "3.8.2" }, os: { type: "Windows", name: "Windows 10", architecture: "amd64", version: "10.0" }, platform: "Java/Oracle Corporation/1.8.0_181-b13" }

2019-02-14 11:52:56.385 INFO 7936 --- [localhost:57487] org.mongodb.driver.connection : Opened connection [connectionId{localValue:2, serverValue:1}] to localhost:57487

2019-02-14 11:52:56.388 INFO 7936 --- [localhost:57487] org.mongodb.driver.cluster : Monitor thread successfully connected to server with description ServerDescription{address=localhost:57487, type=STANDALONE, state=CONNECTED, ok=true, version=ServerVersion{versionList=[3, 5, 5]}, minWireVersion=0, maxWireVersion=5, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=null, roundTripTimeNanos=1033300}

2019-02-14 11:52:56.389 INFO 7936 --- [localhost:57487] org.mongodb.driver.cluster : Discovered cluster type of STANDALONE

2019-02-14 11:52:56.647 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:52:56.648+0800 I NETWORK [thread1] connection accepted from 127.0.0.1:57514 #2 (2 connections now open)

2019-02-14 11:52:56.678 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:52:56.678+0800 I NETWORK [conn2] received client metadata from 127.0.0.1:57514 conn2: { driver: { name: "mongo-java-driver|mongo-java-driver-reactivestreams", version: "3.8.2|1.9.2" }, os: { type: "Windows", name: "Windows 10", architecture: "amd64", version: "10.0" }, platform: "Java/Oracle Corporation/1.8.0_181-b13" }

2019-02-14 11:52:56.692 INFO 7936 --- [localhost:57487] org.mongodb.driver.connection : Opened connection [connectionId{localValue:1, serverValue:2}] to localhost:57487

2019-02-14 11:52:56.694 INFO 7936 --- [localhost:57487] org.mongodb.driver.cluster : Monitor thread successfully connected to server with description ServerDescription{address=localhost:57487, type=STANDALONE, state=CONNECTED, ok=true, version=ServerVersion{versionList=[3, 5, 5]}, minWireVersion=0, maxWireVersion=5, maxDocumentSize=16777216, logicalSessionTimeoutMinutes=null, roundTripTimeNanos=1160700}

2019-02-14 11:52:58.460 INFO 7936 --- [ restartedMain] o.s.cloud.commons.util.InetUtils : Cannot determine local hostname

2019-02-14 11:54:58.537 INFO 7936 --- [ restartedMain] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [

name: masterPersistenceUnit

...]

2019-02-14 11:54:58.604 INFO 7936 --- [ restartedMain] org.hibernate.Version : HHH000412: Hibernate Core {5.3.7.Final}

2019-02-14 11:54:58.606 INFO 7936 --- [ restartedMain] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found

2019-02-14 11:54:58.745 INFO 7936 --- [ restartedMain] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.0.4.Final}

2019-02-14 11:54:58.873 INFO 7936 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...

2019-02-14 11:54:58.973 INFO 7936 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.

2019-02-14 11:54:58.983 INFO 7936 --- [ restartedMain] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect

2019-02-14 11:54:59.516 INFO 7936 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'masterPersistenceUnit'

2019-02-14 11:54:59.655 INFO 7936 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729

2019-02-14 11:55:07.804 INFO 7936 --- [ restartedMain] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [

name: default

...]

2019-02-14 11:55:07.820 INFO 7936 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-2 - Starting...

2019-02-14 11:55:08.065 INFO 7936 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-2 - Start completed.

2019-02-14 11:55:08.066 INFO 7936 --- [ restartedMain] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect

2019-02-14 11:55:08.141 INFO 7936 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'

2019-02-14 11:55:08.164 WARN 7936 --- [ restartedMain] o.s.b.c.c.a.DefaultBatchConfigurer : No transaction manager was provided, using a DataSourceTransactionManage

2019-02-14 11:55:09.465 WARN 7936 --- [ restartedMain] o.s.s.o.p.t.s.JwtAccessTokenConverter : Unable to create an RSA verifier from verifierKey (ignoreable if using MAC)

2019-02-14 11:56:22.456 INFO 7936 --- [ restartedMain] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: Ant [pattern='/static/**'], []

2019-02-14 11:56:22.624 INFO 7936 --- [ restartedMain] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: OrRequestMatcher [requestMatchers=[Ant [pattern='/oauth/token'], Ant [pattern='/oauth/token_key'], Ant [pattern='/oauth/check_token']]], [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@2db3cc24, org.springframework.security.web.context.SecurityContextPersistenceFilter@64d11d2b, org.springframework.security.web.header.HeaderWriterFilter@4f664aa6, org.springframework.security.web.authentication.logout.LogoutFilter@1e318adc, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@17cfe8e6, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@537076f, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@7946d0da, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@7419075f, org.springframework.security.web.session.SessionManagementFilter@32968a2e, org.springframework.security.web.access.ExceptionTranslationFilter@4d4b9288, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@18983d70]

2019-02-14 11:56:22.642 INFO 7936 --- [ restartedMain] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: com.xy.bist.config.ResourceServerConfiguration$OAuth2RequestedMatcher@5280e834, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@545d4747, org.springframework.security.web.context.SecurityContextPersistenceFilter@1286b6ed, org.springframework.security.web.header.HeaderWriterFilter@29f77911, org.springframework.security.web.authentication.logout.LogoutFilter@36fa3e32, org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationProcessingFilter@1ba3453e, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@38b572f2, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@2a18bb04, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@1db6e8ab, org.springframework.security.web.session.SessionManagementFilter@694eb61b, org.springframework.security.web.access.ExceptionTranslationFilter@20e14f00, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@368d0dee]

2019-02-14 11:56:22.682 INFO 7936 --- [ restartedMain] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@78ec17a9, org.springframework.security.web.context.SecurityContextPersistenceFilter@b3d0290, org.springframework.security.web.header.HeaderWriterFilter@114b88d1, org.springframework.security.web.csrf.CsrfFilter@7188b19, org.springframework.security.web.authentication.logout.LogoutFilter@10ec8531, org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter@1befeca8, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@65ec9975, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@28ac8819, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@41d687a3, org.springframework.security.web.session.SessionManagementFilter@48be08dd, org.springframework.security.web.access.ExceptionTranslationFilter@7ad28db7, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@d092a50]

2019-02-14 11:56:44.445 WARN 7936 --- [ restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cloud.task.configuration.SimpleTaskAutoConfiguration': Invocation of init method failed; nested exception is java.lang.IllegalStateException: To use the default TaskConfigurer the context must contain no more than one DataSource, found 2

2019-02-14 11:56:44.446 INFO 7936 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'

2019-02-14 11:56:44.446 INFO 7936 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'masterPersistenceUnit'

2019-02-14 11:56:44.450 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:56:44.450+0800 I - [conn1] end connection 127.0.0.1:57513 (2 connections now open)

2019-02-14 11:56:44.452 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:56:44.451+0800 I NETWORK [thread1] connection accepted from 127.0.0.1:57586 #3 (2 connections now open)

2019-02-14 11:56:44.452 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:56:44.452+0800 I COMMAND [conn3] terminating, shutdown command received

2019-02-14 11:56:44.452 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:56:44.452+0800 I NETWORK [conn3] shutdown: going to close listening sockets...

2019-02-14 11:56:44.452 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:56:44.452+0800 I NETWORK [conn3] closing listening socket: 544

2019-02-14 11:56:44.452 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:56:44.452+0800 I NETWORK [conn3] shutdown: going to flush diaglog...

2019-02-14 11:56:44.452 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:56:44.452+0800 I FTDC [conn3] Shutting down full-time diagnostic data capture

2019-02-14 11:56:44.452 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:56:44.452+0800 I - [conn2] end connection 127.0.0.1:57514 (2 connections now open)

2019-02-14 11:56:44.455 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:56:44.455+0800 I STORAGE [conn3] WiredTigerKVEngine shutting down

2019-02-14 11:56:44.833 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:56:44.833+0800 I STORAGE [conn3] shutdown: removing fs lock...

2019-02-14 11:56:44.833 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:56:44.834+0800 I CONTROL [conn3] now exiting

2019-02-14 11:56:44.833 INFO 7936 --- [ Thread-11] o.s.b.a.mongo.embedded.EmbeddedMongo : 2019-02-14T11:56:44.834+0800 I CONTROL [conn3] shutting down with code:0

2019-02-14 11:56:44.964 INFO 7936 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...

2019-02-14 11:56:44.969 INFO 7936 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.

2019-02-14 11:56:44.970 INFO 7936 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-2 - Shutdown initiated...

2019-02-14 11:56:44.973 INFO 7936 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-2 - Shutdown completed.

2019-02-14 11:56:44.975 INFO 7936 --- [ restartedMain] o.apache.catalina.core.StandardService : Stopping service [Tomcat]

2019-02-14 11:56:44.979 WARN 7936 --- [ restartedMain] o.a.c.loader.WebappClassLoaderBase : The web application [ROOT] appears to have started a thread named [nioEventLoopGroup-4-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:

sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)

sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(Unknown Source)

sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(Unknown Source)

sun.nio.ch.WindowsSelectorImpl.doSelect(Unknown Source)

sun.nio.ch.SelectorImpl.lockAndDoSelect(Unknown Source)

sun.nio.ch.SelectorImpl.select(Unknown Source)

io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62)

io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:757)

io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:412)

io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:897)

io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)

java.lang.Thread.run(Unknown Source)

2019-02-14 11:56:44.991 INFO 7936 --- [ restartedMain] ConditionEvaluationReportLoggingListener :

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.

2019-02-14 11:56:45.003 ERROR 7936 --- [ restartedMain] o.s.boot.SpringApplication : Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cloud.task.configuration.SimpleTaskAutoConfiguration': Invocation of init method failed; nested exception is java.lang.IllegalStateException: To use the default TaskConfigurer the context must contain no more than one DataSource, found 2

at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:139) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:419) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1737) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:576) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]

at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:392) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1288) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1127) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:538) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]

at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:846) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]

at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:863) ~[spring-context-5.1.4.RELEASE.jar:5.1.4.RELEASE]

at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546) ~[spring-context-5.1.4.RELEASE.jar:5.1.4.RELEASE]

at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142) ~[spring-boot-2.1.2.RELEASE.jar:2.1.2.RELEASE]

at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) [spring-boot-2.1.2.RELEASE.jar:2.1.2.RELEASE]

at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.1.2.RELEASE.jar:2.1.2.RELEASE]

at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) [spring-boot-2.1.2.RELEASE.jar:2.1.2.RELEASE]

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) [spring-boot-2.1.2.RELEASE.jar:2.1.2.RELEASE]

at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) [spring-boot-2.1.2.RELEASE.jar:2.1.2.RELEASE]

at com.xy.bist.BistApplication.main(BistApplication.java:15) [main/:na]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_181]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_181]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_181]

at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_181]

at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-2.1.2.RELEASE.jar:2.1.2.RELEASE]

Caused by: java.lang.IllegalStateException: To use the default TaskConfigurer the context must contain no more than one DataSource, found 2

at org.springframework.cloud.task.configuration.SimpleTaskAutoConfiguration.verifyEnvironment(SimpleTaskAutoConfiguration.java:169) ~[spring-cloud-task-core-2.1.0.M2.jar:2.1.0.M2]

at org.springframework.cloud.task.configuration.SimpleTaskAutoConfiguration.getDefaultConfigurer(SimpleTaskAutoConfiguration.java:135) ~[spring-cloud-task-core-2.1.0.M2.jar:2.1.0.M2]

at org.springframework.cloud.task.configuration.SimpleTaskAutoConfiguration.initialize(SimpleTaskAutoConfiguration.java:123) ~[spring-cloud-task-core-2.1.0.M2.jar:2.1.0.M2]

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_181]

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_181]

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_181]

at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_181]

at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:363) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]

at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:307) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]

at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:136) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]

... 32 common frames omitted

回答

和开发者交流更多问题细节吧,去 写回答
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档