Error processing condition on org.springframework.boot.actuate.autoconfigure.audit.AuditEventsEndpoi

Younger50發表於2020-11-04

錯誤資訊:
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [com.SsoServerApplication]; nested exception is java.lang.IllegalStateException: Error processing condition on org.springframework.boot.actuate.autoconfigure.audit.AuditEventsEndpointAutoConfiguration
at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:597) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.access 900 ( C o n f i g u r a t i o n C l a s s P a r s e r . j a v a : 109 )   [ s p r i n g − c o n t e x t − 5.2.2. R E L E A S E . j a r : 5.2.2. R E L E A S E ] a t o r g . s p r i n g f r a m e w o r k . c o n t e x t . a n n o t a t i o n . C o n f i g u r a t i o n C l a s s P a r s e r 900(ConfigurationClassParser.java:109) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.context.annotation.ConfigurationClassParser 900(ConfigurationClassParser.java:109) [springcontext5.2.2.RELEASE.jar:5.2.2.RELEASE]atorg.springframework.context.annotation.ConfigurationClassParserDeferredImportSelectorGroupingHandler.lambda$processGroupImports 1 ( C o n f i g u r a t i o n C l a s s P a r s e r . j a v a : 805 )   [ s p r i n g − c o n t e x t − 5.2.2. R E L E A S E . j a r : 5.2.2. R E L E A S E ] a t j a v a . u t i l . A r r a y L i s t . f o r E a c h ( A r r a y L i s t . j a v a : 1257 )   [ n a : 1.8. 0 1 61 ] a t o r g . s p r i n g f r a m e w o r k . c o n t e x t . a n n o t a t i o n . C o n f i g u r a t i o n C l a s s P a r s e r 1(ConfigurationClassParser.java:805) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE] at java.util.ArrayList.forEach(ArrayList.java:1257) ~[na:1.8.0_161] at org.springframework.context.annotation.ConfigurationClassParser 1(ConfigurationClassParser.java:805) [springcontext5.2.2.RELEASE.jar:5.2.2.RELEASE]atjava.util.ArrayList.forEach(ArrayList.java:1257) [na:1.8.0161]atorg.springframework.context.annotation.ConfigurationClassParserDeferredImportSelectorGroupingHandler.processGroupImports(ConfigurationClassParser.java:801) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorHandler.process(ConfigurationClassParser.java:771) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:188) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:325) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:242) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:95) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:706) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.2.RELEASE.jar:2.2.2.RELEASE]

解決辦法:在yaml檔案中帶單引號不報錯,但是properties檔案中不能帶
management:
endpoints:
web:
exposure:
include: '
在properties中應該修改為:
management.endpoints.web.exposure.exclude=

相關文章