nested exception is java.lang.IllegalStateException: Can‘t configure antMatchers after anyRequest

错误信息:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘springSecurityFilterChain’ defined in class path resource [org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.servlet.Filter]: Factory method ‘springSecurityFilterChain’ threw exception; nested exception is java.lang.IllegalStateException: Can’t configure antMatchers after anyRequest
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:656) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:484) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean 0 ( A b s t r a c t B e a n F a c t o r y . j a v a : 323 )   [ s p r i n g − b e a n s − 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 . b e a n s . f a c t o r y . s u p p o r t . D e f a u l t S i n g l e t o n B e a n R e g i s t r y . g e t S i n g l e t o n ( D e f a u l t S i n g l e t o n B e a n R e g i s t r y . j a v a : 222 )   [ s p r i n g − b e a n s − 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 . b e a n s . f a c t o r y . s u p p o r t . A b s t r a c t B e a n F a c t o r y . d o G e t B e a n ( A b s t r a c t B e a n F a c t o r y . j a v a : 321 )   [ s p r i n g − b e a n s − 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 . b e a n s . f a c t o r y . s u p p o r t . A b s t r a c t B e a n F a c t o r y . g e t B e a n ( A b s t r a c t B e a n F a c t o r y . j a v a : 202 )   [ s p r i n g − b e a n s − 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 . b e a n s . f a c t o r y . s u p p o r t . A b s t r a c t B e a n F a c t o r y . d o G e t B e a n ( A b s t r a c t B e a n F a c t o r y . j a v a : 310 )   [ s p r i n g − b e a n s − 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 . b e a n s . f a c t o r y . s u p p o r t . A b s t r a c t B e a n F a c t o r y . g e t B e a n ( A b s t r a c t B e a n F a c t o r y . j a v a : 202 )   [ s p r i n g − b e a n s − 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 . b e a n s . f a c t o r y . s u p p o r t . D e f a u l t L i s t a b l e B e a n F a c t o r y . p r e I n s t a n t i a t e S i n g l e t o n s ( D e f a u l t L i s t a b l e B e a n F a c t o r y . j a v a : 879 )   [ s p r i n g − b e a n s − 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 . s u p p o r t . A b s t r a c t A p p l i c a t i o n C o n t e x t . f i n i s h B e a n F a c t o r y I n i t i a l i z a t i o n ( A b s t r a c t A p p l i c a t i o n C o n t e x t . j a v a : 878 )   [ 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 . s u p p o r t . A b s t r a c t A p p l i c a t i o n C o n t e x t . r e f r e s h ( A b s t r a c t A p p l i c a t i o n C o n t e x t . j a v a : 550 )   [ 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 . b o o t . w e b . s e r v l e t . c o n t e x t . S e r v l e t W e b S e r v e r A p p l i c a t i o n C o n t e x t . r e f r e s h ( S e r v l e t W e b S e r v e r A p p l i c a t i o n C o n t e x t . j a v a : 141 )   [ s p r i n g − b o o t − 2.2.2. R E L E A S E . j a r : 2.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 . b o o t . S p r i n g A p p l i c a t i o n . r e f r e s h ( S p r i n g A p p l i c a t i o n . j a v a : 747 ) [ s p r i n g − b o o t − 2.2.2. R E L E A S E . j a r : 2.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 . b o o t . S p r i n g A p p l i c a t i o n . r e f r e s h C o n t e x t ( S p r i n g A p p l i c a t i o n . j a v a : 397 ) [ s p r i n g − b o o t − 2.2.2. R E L E A S E . j a r : 2.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 . b o o t . S p r i n g A p p l i c a t i o n . r u n ( S p r i n g A p p l i c a t i o n . j a v a : 315 ) [ s p r i n g − b o o t − 2.2.2. R E L E A S E . j a r : 2.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 . b o o t . S p r i n g A p p l i c a t i o n . r u n ( S p r i n g A p p l i c a t i o n . j a v a : 1226 ) [ s p r i n g − b o o t − 2.2.2. R E L E A S E . j a r : 2.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 . b o o t . S p r i n g A p p l i c a t i o n . r u n ( S p r i n g A p p l i c a t i o n . j a v a : 1215 ) [ s p r i n g − b o o t − 2.2.2. R E L E A S E . j a r : 2.2.2. R E L E A S E ] a t c o m . S s o S e r v e r A p p l i c a t i o n . m a i n ( S s o S e r v e r A p p l i c a t i o n . j a v a : 18 ) [ c l a s s e s / : n a ] a t s u n . r e f l e c t . N a t i v e M e t h o d A c c e s s o r I m p l . i n v o k e 0 ( N a t i v e M e t h o d )   [ n a : 1.8. 0 1 61 ] a t s u n . r e f l e c t . N a t i v e M e t h o d A c c e s s o r I m p l . i n v o k e ( N a t i v e M e t h o d A c c e s s o r I m p l . j a v a : 62 )   [ n a : 1.8. 0 1 61 ] a t s u n . r e f l e c t . D e l e g a t i n g M e t h o d A c c e s s o r I m p l . i n v o k e ( D e l e g a t i n g M e t h o d A c c e s s o r I m p l . j a v a : 43 )   [ n a : 1.8. 0 1 61 ] a t j a v a . l a n g . r e f l e c t . M e t h o d . i n v o k e ( M e t h o d . j a v a : 498 )   [ 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 . b o o t . d e v t o o l s . r e s t a r t . R e s t a r t L a u n c h e r . r u n ( R e s t a r t L a u n c h e r . j a v a : 49 ) [ s p r i n g − b o o t − d e v t o o l s − 2.2.2. R E L E A S E . j a r : 2.2.2. R E L E A S E ] C a u s e d b y : o r g . s p r i n g f r a m e w o r k . b e a n s . B e a n I n s t a n t i a t i o n E x c e p t i o n : F a i l e d t o i n s t a n t i a t e [ j a v a x . s e r v l e t . F i l t e r ] : F a c t o r y m e t h o d ′ s p r i n g S e c u r i t y F i l t e r C h a i n ′ t h r e w e x c e p t i o n ; n e s t e d e x c e p t i o n i s j a v a . l a n g . I l l e g a l S t a t e E x c e p t i o n : C a n ′ t c o n f i g u r e a n t M a t c h e r s a f t e r a n y R e q u e s t a t o r g . s p r i n g f r a m e w o r k . b e a n s . f a c t o r y . s u p p o r t . S i m p l e I n s t a n t i a t i o n S t r a t e g y . i n s t a n t i a t e ( S i m p l e I n s t a n t i a t i o n S t r a t e g y . j a v a : 185 )   [ s p r i n g − b e a n s − 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 . b e a n s . f a c t o r y . s u p p o r t . C o n s t r u c t o r R e s o l v e r . i n s t a n t i a t e ( C o n s t r u c t o r R e s o l v e r . j a v a : 651 )   [ s p r i n g − b e a n s − 5.2.2. R E L E A S E . j a r : 5.2.2. R E L E A S E ] . . . 26 c o m m o n f r a m e s o m i t t e d C a u s e d b y : j a v a . l a n g . I l l e g a l S t a t e E x c e p t i o n : C a n ′ t c o n f i g u r e a n t M a t c h e r s a f t e r a n y R e q u e s t a t o r g . s p r i n g f r a m e w o r k . u t i l . A s s e r t . s t a t e ( A s s e r t . j a v a : 73 )   [ s p r i n g − c o r e − 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 . s e c u r i t y . c o n f i g . a n n o t a t i o n . w e b . A b s t r a c t R e q u e s t M a t c h e r R e g i s t r y . a n t M a t c h e r s ( A b s t r a c t R e q u e s t M a t c h e r R e g i s t r y . j a v a : 122 )   [ s p r i n g − s e c u r i t y − c o n f i g − 5.2.1. R E L E A S E . j a r : 5.2.1. R E L E A S E ] a t c o m . y g e r . s e c u r i t y . c o r e . a u t h o r i z e . Y g e r A u t h o r i z e C o n f i g P r o v i d e r . c o n f i g ( Y g e r A u t h o r i z e C o n f i g P r o v i d e r . j a v a : 31 )   [ c l a s s e s / : n a ] a t c o m . y g e r . s e c u r i t y . c o r e . a u t h o r i z e . Y g e r A u t h o r i z e C o n f i g M a n a g e r . c o n f i g ( Y g e r A u t h o r i z e C o n f i g M a n a g e r . j a v a : 33 )   [ c l a s s e s / : n a ] a t c o m . y g e r . s e c u r i t y . s e r v e r . Y g e r R e s o u r c e S e r v e r C o n f i g . c o n f i g u r e ( Y g e r R e s o u r c e S e r v e r C o n f i g . j a v a : 78 )   [ c l a s s e s / : n a ] a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . o a u t h 2. c o n f i g . a n n o t a t i o n . w e b . c o n f i g u r a t i o n . R e s o u r c e S e r v e r C o n f i g u r a t i o n . c o n f i g u r e ( R e s o u r c e S e r v e r C o n f i g u r a t i o n . j a v a : 154 )   [ s p r i n g − s e c u r i t y − o a u t h 2 − 2.2.3. R E L E A S E . j a r : n a ] a t o r g . s p r i n g f r a m e w o r k . s e c u r i t y . c o n f i g . a n n o t a t i o n . w e b . c o n f i g u r a t i o n . W e b S e c u r i t y C o n f i g u r e r A d a p t e r . g e t H t t p ( W e b S e c u r i t y C o n f i g u r e r A d a p t e r . j a v a : 231 )   [ s p r i n g − s e c u r i t y − c o n f i g − 5.2.1. R E L E A S E . j a r : 5.2.1. 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 . s e c u r i t y . c o n f i g . a n n o t a t i o n . w e b . c o n f i g u r a t i o n . W e b S e c u r i t y C o n f i g u r e r A d a p t e r . i n i t ( W e b S e c u r i t y C o n f i g u r e r A d a p t e r . j a v a : 322 )   [ s p r i n g − s e c u r i t y − c o n f i g − 5.2.1. R E L E A S E . j a r : 5.2.1. 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 . s e c u r i t y . c o n f i g . a n n o t a t i o n . w e b . c o n f i g u r a t i o n . W e b S e c u r i t y C o n f i g u r e r A d a p t e r . i n i t ( W e b S e c u r i t y C o n f i g u r e r A d a p t e r . j a v a : 92 )   [ s p r i n g − s e c u r i t y − c o n f i g − 5.2.1. R E L E A S E . j a r : 5.2.1. 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 . s e c u r i t y . o a u t h 2. c o n f i g . a n n o t a t i o n . w e b . c o n f i g u r a t i o n . R e s o u r c e S e r v e r C o n f i g u r a t i o n 0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:879) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878) ~[spring-context-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[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] at com.SsoServerApplication.main(SsoServerApplication.java:18) [classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_161] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_161] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_161] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_161] at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-2.2.2.RELEASE.jar:2.2.2.RELEASE] Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.servlet.Filter]: Factory method 'springSecurityFilterChain' threw exception; nested exception is java.lang.IllegalStateException: Can't configure antMatchers after anyRequest at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE] ... 26 common frames omitted Caused by: java.lang.IllegalStateException: Can't configure antMatchers after anyRequest at org.springframework.util.Assert.state(Assert.java:73) ~[spring-core-5.2.2.RELEASE.jar:5.2.2.RELEASE] at org.springframework.security.config.annotation.web.AbstractRequestMatcherRegistry.antMatchers(AbstractRequestMatcherRegistry.java:122) ~[spring-security-config-5.2.1.RELEASE.jar:5.2.1.RELEASE] at com.yger.security.core.authorize.YgerAuthorizeConfigProvider.config(YgerAuthorizeConfigProvider.java:31) ~[classes/:na] at com.yger.security.core.authorize.YgerAuthorizeConfigManager.config(YgerAuthorizeConfigManager.java:33) ~[classes/:na] at com.yger.security.server.YgerResourceServerConfig.configure(YgerResourceServerConfig.java:78) ~[classes/:na] at org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfiguration.configure(ResourceServerConfiguration.java:154) ~[spring-security-oauth2-2.2.3.RELEASE.jar:na] at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.getHttp(WebSecurityConfigurerAdapter.java:231) ~[spring-security-config-5.2.1.RELEASE.jar:5.2.1.RELEASE] at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.init(WebSecurityConfigurerAdapter.java:322) ~[spring-security-config-5.2.1.RELEASE.jar:5.2.1.RELEASE] at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.init(WebSecurityConfigurerAdapter.java:92) ~[spring-security-config-5.2.1.RELEASE.jar:5.2.1.RELEASE] at org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfiguration 0(AbstractBeanFactory.java:323) [springbeans5.2.2.RELEASE.jar:5.2.2.RELEASE]atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [springbeans5.2.2.RELEASE.jar:5.2.2.RELEASE]atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) [springbeans5.2.2.RELEASE.jar:5.2.2.RELEASE]atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) [springbeans5.2.2.RELEASE.jar:5.2.2.RELEASE]atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) [springbeans5.2.2.RELEASE.jar:5.2.2.RELEASE]atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) [springbeans5.2.2.RELEASE.jar:5.2.2.RELEASE]atorg.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:879) [springbeans5.2.2.RELEASE.jar:5.2.2.RELEASE]atorg.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878) [springcontext5.2.2.RELEASE.jar:5.2.2.RELEASE]atorg.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) [springcontext5.2.2.RELEASE.jar:5.2.2.RELEASE]atorg.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) [springboot2.2.2.RELEASE.jar:2.2.2.RELEASE]atorg.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)[springboot2.2.2.RELEASE.jar:2.2.2.RELEASE]atorg.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)[springboot2.2.2.RELEASE.jar:2.2.2.RELEASE]atorg.springframework.boot.SpringApplication.run(SpringApplication.java:315)[springboot2.2.2.RELEASE.jar:2.2.2.RELEASE]atorg.springframework.boot.SpringApplication.run(SpringApplication.java:1226)[springboot2.2.2.RELEASE.jar:2.2.2.RELEASE]atorg.springframework.boot.SpringApplication.run(SpringApplication.java:1215)[springboot2.2.2.RELEASE.jar:2.2.2.RELEASE]atcom.SsoServerApplication.main(SsoServerApplication.java:18)[classes/:na]atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod) [na:1.8.0161]atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [na:1.8.0161]atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [na:1.8.0161]atjava.lang.reflect.Method.invoke(Method.java:498) [na:1.8.0161]atorg.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)[springbootdevtools2.2.2.RELEASE.jar:2.2.2.RELEASE]Causedby:org.springframework.beans.BeanInstantiationException:Failedtoinstantiate[javax.servlet.Filter]:FactorymethodspringSecurityFilterChainthrewexception;nestedexceptionisjava.lang.IllegalStateException:CantconfigureantMatchersafteranyRequestatorg.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) [springbeans5.2.2.RELEASE.jar:5.2.2.RELEASE]atorg.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651) [springbeans5.2.2.RELEASE.jar:5.2.2.RELEASE]...26commonframesomittedCausedby:java.lang.IllegalStateException:CantconfigureantMatchersafteranyRequestatorg.springframework.util.Assert.state(Assert.java:73) [springcore5.2.2.RELEASE.jar:5.2.2.RELEASE]atorg.springframework.security.config.annotation.web.AbstractRequestMatcherRegistry.antMatchers(AbstractRequestMatcherRegistry.java:122) [springsecurityconfig5.2.1.RELEASE.jar:5.2.1.RELEASE]atcom.yger.security.core.authorize.YgerAuthorizeConfigProvider.config(YgerAuthorizeConfigProvider.java:31) [classes/:na]atcom.yger.security.core.authorize.YgerAuthorizeConfigManager.config(YgerAuthorizeConfigManager.java:33) [classes/:na]atcom.yger.security.server.YgerResourceServerConfig.configure(YgerResourceServerConfig.java:78) [classes/:na]atorg.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfiguration.configure(ResourceServerConfiguration.java:154) [springsecurityoauth22.2.3.RELEASE.jar:na]atorg.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.getHttp(WebSecurityConfigurerAdapter.java:231) [springsecurityconfig5.2.1.RELEASE.jar:5.2.1.RELEASE]atorg.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.init(WebSecurityConfigurerAdapter.java:322) [springsecurityconfig5.2.1.RELEASE.jar:5.2.1.RELEASE]atorg.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.init(WebSecurityConfigurerAdapter.java:92) [springsecurityconfig5.2.1.RELEASE.jar:5.2.1.RELEASE]atorg.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfiguration E n h a n c e r B y S p r i n g C G L I B EnhancerBySpringCGLIB EnhancerBySpringCGLIB$ecf5d2b1.init() ~[spring-security-oauth2-2.2.3.RELEASE.jar:na]
at org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.init(AbstractConfiguredSecurityBuilder.java:370) ~[spring-security-config-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.doBuild(AbstractConfiguredSecurityBuilder.java:324) ~[spring-security-config-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at org.springframework.security.config.annotation.AbstractSecurityBuilder.build(AbstractSecurityBuilder.java:41) ~[spring-security-config-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration.springSecurityFilterChain(WebSecurityConfiguration.java:104) ~[spring-security-config-5.2.1.RELEASE.jar:5.2.1.RELEASE]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_161]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_161]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_161]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_161]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.2.2.RELEASE.jar:5.2.2.RELEASE]
… 27 common frames omitted

问题原因:
使用SpringSecurity配置http顺序错误,不能在anyRequest()之后再配置permitAll(),
anyRequest()必须是最后一个

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

东芃9394

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值