Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
328 views
in Technique[技术] by (71.8m points)

INFO warnings about multiple modules in Spring Boot, what do they mean?

I recently bumped up my spring boot version to 1.4.0. Now I see the following warnings below. I am using spring-mongodb and spring-redis (strictly for caching). Is this something I should be concerned about?

Multiple Spring Data modules found, entering strict repository configuration mode!

Spring Data Redis - Could not safely identify store assignment for repository

What does strict repository configuration mode really mean?

    .   ____          _            __ _ _
/\ / ___'_ __ _ _(_)_ __  __ _    
( ( )\___ | '_ | '_| | '_ / _` |    
\/  ___)| |_)| | | | | || (_| |  ) ) ) )
'  |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot ::        (v1.4.0.RELEASE)

2016-09-11 00:03:11.234  INFO 24766 --- [           main] testapp.Application                     : Starting Application on macbookhome with PID 24766 (/Users/me/Code/testapp/testapp-svc/build/classes/main started by me in /Users/me/Code/testapp/testapp-svc)
2016-09-11 00:03:11.238  INFO 24766 --- [           main] testapp.Application                     : The following profiles are active: default
2016-09-11 00:03:11.319  INFO 24766 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@7393222f: startup date [Sun Sep 11 00:03:11 EDT 2016]; root of context hierarchy
2016-09-11 00:03:14.092  INFO 24766 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
2016-09-11 00:03:14.275  INFO 24766 --- [           main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
2016-09-11 00:03:14.346  INFO 24766 --- [           main] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface testapp.repositories.topics.TopicRepository.
2016-09-11 00:03:14.349  INFO 24766 --- [           main] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface testapp.repositories.entries.EntryRepository.
2016-09-11 00:03:14.350  INFO 24766 --- [           main] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface testapp.repositories.AppSettingsRepository.
2016-09-11 00:03:14.351  INFO 24766 --- [           main] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface testapp.repositories.UserRepository.
2016-09-11 00:03:14.353  INFO 24766 --- [           main] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface testapp.repositories.BookmarkRepository.
2016-09-11 00:03:14.354  INFO 24766 --- [           main] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface testapp.repositories.FlagRepository.
2016-09-11 00:03:14.356  INFO 24766 --- [           main] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface testapp.repositories.FollowRepository.
2016-09-11 00:03:14.360  INFO 24766 --- [           main] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface testapp.repositories.entries.UserEntryRepository.
2016-09-11 00:03:14.361  INFO 24766 --- [           main] .RepositoryConfigurationExtensionSupport : Spring Data Redis - Could not safely identify store assignment for repository candidate interface testapp.repositories.ShareRepository.
2016-09-11 00:03:14.899  INFO 24766 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'springAsyncConfiguration' of type [class testapp.configuration.SpringAsyncConfiguration$$EnhancerBySpringCGLIB$$2ae6dc36] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2016-09-11 00:03:14.923  INFO 24766 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 
2016-09-11 00:03:14.939  INFO 24766 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService  'taskExecutor'
2016-09-11 00:03:14.939  INFO 24766 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'taskExecutor' of type [class org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2016-09-11 00:03:15.026  INFO 24766 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cache.annotation.ProxyCachingConfiguration' of type [class org.springframework.cache.annotation.ProxyCachingConfiguration$$EnhancerBySpringCGLIB$$26a81448] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2016-09-11 00:03:15.658  INFO 24766 --- [           main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
2016-09-11 00:03:15.674  INFO 24766 --- [           main] o.apache.catalina.core.StandardService   : Starting service Tomcat
2016-09-11 00:03:15.675  INFO 24766 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.4
2016-09-11 00:03:15.801  INFO 24766 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2016-09-11 00:03:15.801  INFO 24766 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 4487 ms
2016-09-11 00:03:16.334  INFO 24766 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'metricFilter' to: [/*]
2016-09-11 00:03:16.335  INFO 24766 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2016-09-11 00:03:16.335  INFO 24766 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2016-09-11 00:03:16.335  INFO 24766 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2016-09-11 00:03:16.336  INFO 24766 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'requestContextFilter' to: [/*]
2016-09-11 00:03:16.339  INFO 24766 --- [ost-startStop-1] .s.DelegatingFilterProxyRegistrationBean : Mapping filter: 'springSecurityFilterChain' to: [/*]
2016-09-11 00:03:16.339  INFO 24766 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'webRequestLoggingFilter' to: [/*]
2016-09-11 00:03:16.340  INFO 24766 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'applicationContextIdFilter' to: [/*]
2016-09-11 00:03:16.341  INFO 24766 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean  : Mapping servlet: 'dispatcherServlet' to [/]
2016-09-11 00:03:17.075  INFO 24766 --- [           main] org.mongodb.driver.cluster               : Cluster created with settings {hosts=[ds041094-a0.mongolab.com:41094, ds041094-a1.mongolab.com:41094], mode=MULTIPLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500}
2016-09-11 00:03:17.075  INFO 24766 --- [           main] org.mongodb.driver.cluster               : Adding discovered server ds041094-a0.mongolab.com:41094 to client view of cluster
2016-09-11 00:03:17.100  INFO 24766 --- [           main] org.mongodb.driver.cluster               : Adding discovered server ds041094-a1.mongolab.com:41094 to client view of cluster
2016-09-11 00:03:17.863  INFO 24766 --- [golab.com:41094] org.mongodb.driver.connection            : Opened connection [connectionId{localValue:2, serverValue:976946}] to ds041094-a0.mongolab.com:41094
2016-09-11 00:03:17.888  INFO 24766 --- [golab.com:41094] org.mongodb.driver.cluster               : Monitor thread successfully connected to server with description ServerDescription{address=ds041094-a0.mongolab.com:41094, type=REPLICA_SET_PRIMARY, state=CONNECTED, ok=true, version=ServerVersion{versionList=[3, 0, 7]}, minWireVersion=0, maxWireVersion=3, maxDocumentSize=16777216, roundTripTimeNanos=24085956, setName='rs-ds041094', canonicalAddress=ds041094-a0.mongolab.com:41094, hosts=[ds041094-a0.mongolab.com:41094, ds041094-a1.mongolab.com:41094], passives=[], arbiters=[ds041094-ar0.mongolab.com:41094], primary='ds041094-a0.mongolab.com:41094', tagSet=TagSet{[]}, electionId=5736155bb89bc895bfdb9c2f, setVersion=3}
2016-09-11 00:03:17.890  INFO 24766 --- [golab.com:41094] org.mongodb.driver.cluster               : Discovered cluster type of REPLICA_SET
2016-09-11 00:03:17.890  INFO 24766 --- [golab.com:41094] org.mongodb.driver.cluster               : Adding discovered server ds041094-ar0.mongolab.com:41094 to client view of cluster
2016-09-11 00:03:17.891  INFO 24766 --- [golab.com:41094] org.mongodb.driver.connection            : Opened connection [connectionId{localValue:1, serverValue:1178641}] to ds041094-a1.mongolab.com:41094
2016-09-11 00:03:17.892  INFO 24766 --- [golab.com:41094] org.mongodb.driver.cluster               : Setting max election id to 5736155bb89bc895bfdb9c2f from replica set primary ds041094-a0.mongolab.com:41094
2016-09-11 00:03:17.892  INFO 24766 --- [golab.com:41094] org.mongodb.driver.cluster               : Setting max set version to 3 from replica set primary ds041094-a0.mongolab.com:41094
2016-09-11 00:03:17.892  INFO 24766 --- [golab.com:41094] org.mongodb.driver.cluster               : Discovered replica set primary ds041094-a0.mongolab.com:41094
2016-09-11 00:03:17.943  INFO 24766 --- [golab.com:41094] org.mongodb.driver.cluster               : Monitor thread successfully connected to server with description ServerDescription{address=ds041094-a1.mongolab.com:41094, type=REPLICA_SET_SECONDARY, state=CONNECTED, ok=true, version=ServerVersion{versionList=[3, 0, 7]}, minWireVersion=0, maxWireVersion=3, maxDocumentSize=16777216, roundTripTimeNanos=51084368, setName='rs-ds041094', canonicalAddress=ds041094-a1.mongolab.com:41094, hosts=[ds041094-a0.mongolab.com:41094, ds041094-a1.mongolab.com:41094], passives=[], arbiters=[ds041094-ar0.mongolab.com:41094], primary='ds041094-a0.mongolab.com:41094', tagSet=TagSet{[]}, electionId=null, setVersion=3}
2016-09-11 00:03:18.108  INFO 24766 --- [golab.com:41094] org.mongodb.driver.connection            : Opened connection [connectionId{localValue:3, serverValue:2200709}] to ds041094-ar0.mongolab.com:41094
2016-09-11 00:03:18.155  INFO 24766 --- [golab.com:41094] org.mongodb.driver.cluster               : Monitor thread successfully connected to server with description ServerDescription{address=ds041094-ar0.mongolab.com:41094, type=REPLICA_SET_ARBITER, state=CONNECTED, ok=true, version=ServerVersion{versionList=[3, 0, 7]}, minWireVersion=0, maxWireVersion=3, maxDocumentSize=16777216, roundTripTimeNanos=46937906, setName='rs-ds041094', canonicalAddress=ds041094-ar0.mongolab.com:41094, hosts=[ds041094-a0.mongolab.com:41094, ds041094-a1.mongolab.com:41094], passives=[], arbiters=[ds041094-ar0.mongolab.com:41094], primary='ds041094-a0.mongolab.com:41094', tagSet=TagSet{[]}, electionId=null, setVersion=3}
2016-09-11 00:03:18.357  INFO 24766 --- [           main] org.mongodb.driver.connection            : Opened connection [connectionId{localValue:4, serverValue:976947}] to ds041094-a0.mongolab.com:41094
2016-09-11 00:03:20.185  INFO 2

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

If you are using redis implementing your own persistence layer, you are not using the interface that extends CrudRepository.

That was my case, I just deactivated the redis repositories search and the message below disappeared from my JPA repositories.

Spring Data Redis - Could not safely identify store assignment for repository candidate interface

To disable redis repositories set to false in application.properties:

spring.data.redis.repositories.type = none

In older versions: .repositories.enabled = false

This is already a relief because for many JPA repositories this is pretty annoying.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...