Spring Security错误

xiaoxiao2021-03-01  23

因为一个“/”引发的异常灾难 因为少写了一个“/”符号,浪费我大量时间,搞笑,定向的是 方法 而不是界面 Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled. 2018-09-18 16:32:29.662 ERROR 7636 — [ restartedMain] o.s.boot.SpringApplication : Application run failed

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.IllegalArgumentException: ‘login?error’ is not a valid redirect URL at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:590) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1247) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1096) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:535) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.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 : 317 )   [ s p r i n g − b e a n s − 5.0.8. R E L E A S E . j a r : 5.0.8. 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.0.8. R E L E A S E . j a r : 5.0.8. 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 : 315 )   [ s p r i n g − b e a n s − 5.0.8. R E L E A S E . j a r : 5.0.8. 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 : 199 )   [ s p r i n g − b e a n s − 5.0.8. R E L E A S E . j a r : 5.0.8. 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 : 304 )   [ s p r i n g − b e a n s − 5.0.8. R E L E A S E . j a r : 5.0.8. 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 : 199 )   [ s p r i n g − b e a n s − 5.0.8. R E L E A S E . j a r : 5.0.8. 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 : 759 )   [ s p r i n g − b e a n s − 5.0.8. R E L E A S E . j a r : 5.0.8. 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 : 869 )   [ s p r i n g − c o n t e x t − 5.0.8. R E L E A S E . j a r : 5.0.8. 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.0.8. R E L E A S E . j a r : 5.0.8. 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 : 140 )   [ s p r i n g − b o o t − 2.0.4. R E L E A S E . j a r : 2.0.4. 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 : 762 ) [ s p r i n g − b o o t − 2.0.4. R E L E A S E . j a r : 2.0.4. 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 : 398 ) [ s p r i n g − b o o t − 2.0.4. R E L E A S E . j a r : 2.0.4. 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 : 330 ) [ s p r i n g − b o o t − 2.0.4. R E L E A S E . j a r : 2.0.4. 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 : 1258 ) [ s p r i n g − b o o t − 2.0.4. R E L E A S E . j a r : 2.0.4. 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 : 1246 ) [ s p r i n g − b o o t − 2.0.4. R E L E A S E . j a r : 2.0.4. R E L E A S E ] a t c o m . e x a m p l e . A p p l i c a t i o n . m a i n ( A p p l i c a t i o n . j a v a : 10 ) [ 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 9 2 ] 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 9 2 ] 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 9 2 ] 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 9 2 ] 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.0.4. R E L E A S E . j a r : 2.0.4. 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 A r g u m e n t E x c e p t i o n : ′ l o g i n ? e r r o r ′ i s n o t a v a l i d r e d i r e c t U R L 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.0.8. R E L E A S E . j a r : 5.0.8. 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 U s i n g F a c t o r y M e t h o d ( C o n s t r u c t o r R e s o l v e r . j a v a : 582 )   [ s p r i n g − b e a n s − 5.0.8. R E L E A S E . j a r : 5.0.8. R E L E A S E ] . . . 25 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 A r g u m e n t E x c e p t i o n : ′ l o g i n ? e r r o r ′ i s n o t a v a l i d r e d i r e c t U R L 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 . i s T r u e ( A s s e r t . j a v a : 116 )   [ s p r i n g − c o r e − 5.0.8. R E L E A S E . j a r : 5.0.8. 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 . w e b . a u t h e n t i c a t i o n . S i m p l e U r l A u t h e n t i c a t i o n F a i l u r e H a n d l e r . s e t D e f a u l t F a i l u r e U r l ( S i m p l e U r l A u t h e n t i c a t i o n F a i l u r e H a n d l e r . j a v a : 126 )   [ s p r i n g − s e c u r i t y − w e b − 5.0.7. R E L E A S E . j a r : 5.0.7. 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 . w e b . a u t h e n t i c a t i o n . S i m p l e U r l A u t h e n t i c a t i o n F a i l u r e H a n d l e r . < i n i t > ( S i m p l e U r l A u t h e n t i c a t i o n F a i l u r e H a n d l e r . j a v a : 61 )   [ s p r i n g − s e c u r i t y − w e b − 5.0.7. R E L E A S E . j a r : 5.0.7. 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 e r s . A b s t r a c t A u t h e n t i c a t i o n F i l t e r C o n f i g u r e r . f a i l u r e U r l ( A b s t r a c t A u t h e n t i c a t i o n F i l t e r C o n f i g u r e r . j a v a : 212 )   [ s p r i n g − s e c u r i t y − c o n f i g − 5.0.7. R E L E A S E . j a r : 5.0.7. 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 e r s . A b s t r a c t A u t h e n t i c a t i o n F i l t e r C o n f i g u r e r . u p d a t e A u t h e n t i c a t i o n D e f a u l t s ( A b s t r a c t A u t h e n t i c a t i o n F i l t e r C o n f i g u r e r . j a v a : 383 )   [ s p r i n g − s e c u r i t y − c o n f i g − 5.0.7. R E L E A S E . j a r : 5.0.7. 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 e r s . A b s t r a c t A u t h e n t i c a t i o n F i l t e r C o n f i g u r e r . l o g i n P a g e ( A b s t r a c t A u t h e n t i c a t i o n F i l t e r C o n f i g u r e r . j a v a : 314 )   [ s p r i n g − s e c u r i t y − c o n f i g − 5.0.7. R E L E A S E . j a r : 5.0.7. 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 e r s . F o r m L o g i n C o n f i g u r e r . l o g i n P a g e ( F o r m L o g i n C o n f i g u r e r . j a v a : 183 )   [ s p r i n g − s e c u r i t y − c o n f i g − 5.0.7. R E L E A S E . j a r : 5.0.7. R E L E A S E ] a t c o m . e x a m p l e . W e b S e c u r i t y C o n f i g . c o n f i g u r e ( W e b S e c u r i t y C o n f i g . j a v a : 21 )   [ 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 . 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 : 230 )   [ s p r i n g − s e c u r i t y − c o n f i g − 5.0.7. R E L E A S E . j a r : 5.0.7. 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 : 321 )   [ s p r i n g − s e c u r i t y − c o n f i g − 5.0.7. R E L E A S E . j a r : 5.0.7. 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.0.7. R E L E A S E . j a r : 5.0.7. R E L E A S E ] a t c o m . e x a m p l e . W e b S e c u r i t y C o n f i g 0(AbstractBeanFactory.java:317) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:304) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:759) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869) ~[spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:762) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:398) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:330) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1258) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1246) [spring-boot-2.0.4.RELEASE.jar:2.0.4.RELEASE] at com.example.Application.main(Application.java:10) [classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_92] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_92] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_92] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_92] at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-2.0.4.RELEASE.jar:2.0.4.RELEASE] Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.servlet.Filter]: Factory method 'springSecurityFilterChain' threw exception; nested exception is java.lang.IllegalArgumentException: 'login?error' is not a valid redirect URL at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:582) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE] ... 25 common frames omitted Caused by: java.lang.IllegalArgumentException: 'login?error' is not a valid redirect URL at org.springframework.util.Assert.isTrue(Assert.java:116) ~[spring-core-5.0.8.RELEASE.jar:5.0.8.RELEASE] at org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler.setDefaultFailureUrl(SimpleUrlAuthenticationFailureHandler.java:126) ~[spring-security-web-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler.<init>(SimpleUrlAuthenticationFailureHandler.java:61) ~[spring-security-web-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.security.config.annotation.web.configurers.AbstractAuthenticationFilterConfigurer.failureUrl(AbstractAuthenticationFilterConfigurer.java:212) ~[spring-security-config-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.security.config.annotation.web.configurers.AbstractAuthenticationFilterConfigurer.updateAuthenticationDefaults(AbstractAuthenticationFilterConfigurer.java:383) ~[spring-security-config-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.security.config.annotation.web.configurers.AbstractAuthenticationFilterConfigurer.loginPage(AbstractAuthenticationFilterConfigurer.java:314) ~[spring-security-config-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.security.config.annotation.web.configurers.FormLoginConfigurer.loginPage(FormLoginConfigurer.java:183) ~[spring-security-config-5.0.7.RELEASE.jar:5.0.7.RELEASE] at com.example.WebSecurityConfig.configure(WebSecurityConfig.java:21) ~[classes/:na] at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.getHttp(WebSecurityConfigurerAdapter.java:230) ~[spring-security-config-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.init(WebSecurityConfigurerAdapter.java:321) ~[spring-security-config-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.init(WebSecurityConfigurerAdapter.java:92) ~[spring-security-config-5.0.7.RELEASE.jar:5.0.7.RELEASE] at com.example.WebSecurityConfig 0(AbstractBeanFactory.java:317) [springbeans5.0.8.RELEASE.jar:5.0.8.RELEASE]atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [springbeans5.0.8.RELEASE.jar:5.0.8.RELEASE]atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) [springbeans5.0.8.RELEASE.jar:5.0.8.RELEASE]atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) [springbeans5.0.8.RELEASE.jar:5.0.8.RELEASE]atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:304) [springbeans5.0.8.RELEASE.jar:5.0.8.RELEASE]atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) [springbeans5.0.8.RELEASE.jar:5.0.8.RELEASE]atorg.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:759) [springbeans5.0.8.RELEASE.jar:5.0.8.RELEASE]atorg.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:869) [springcontext5.0.8.RELEASE.jar:5.0.8.RELEASE]atorg.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) [springcontext5.0.8.RELEASE.jar:5.0.8.RELEASE]atorg.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) [springboot2.0.4.RELEASE.jar:2.0.4.RELEASE]atorg.springframework.boot.SpringApplication.refresh(SpringApplication.java:762)[springboot2.0.4.RELEASE.jar:2.0.4.RELEASE]atorg.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:398)[springboot2.0.4.RELEASE.jar:2.0.4.RELEASE]atorg.springframework.boot.SpringApplication.run(SpringApplication.java:330)[springboot2.0.4.RELEASE.jar:2.0.4.RELEASE]atorg.springframework.boot.SpringApplication.run(SpringApplication.java:1258)[springboot2.0.4.RELEASE.jar:2.0.4.RELEASE]atorg.springframework.boot.SpringApplication.run(SpringApplication.java:1246)[springboot2.0.4.RELEASE.jar:2.0.4.RELEASE]atcom.example.Application.main(Application.java:10)[classes/:na]atsun.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod) [na:1.8.092]atsun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [na:1.8.092]atsun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [na:1.8.092]atjava.lang.reflect.Method.invoke(Method.java:498) [na:1.8.092]atorg.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)[springbootdevtools2.0.4.RELEASE.jar:2.0.4.RELEASE]Causedby:org.springframework.beans.BeanInstantiationException:Failedtoinstantiate[javax.servlet.Filter]:FactorymethodspringSecurityFilterChainthrewexception;nestedexceptionisjava.lang.IllegalArgumentException:login?errorisnotavalidredirectURLatorg.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185) [springbeans5.0.8.RELEASE.jar:5.0.8.RELEASE]atorg.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:582) [springbeans5.0.8.RELEASE.jar:5.0.8.RELEASE]...25commonframesomittedCausedby:java.lang.IllegalArgumentException:login?errorisnotavalidredirectURLatorg.springframework.util.Assert.isTrue(Assert.java:116) [springcore5.0.8.RELEASE.jar:5.0.8.RELEASE]atorg.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler.setDefaultFailureUrl(SimpleUrlAuthenticationFailureHandler.java:126) [springsecurityweb5.0.7.RELEASE.jar:5.0.7.RELEASE]atorg.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler.<init>(SimpleUrlAuthenticationFailureHandler.java:61) [springsecurityweb5.0.7.RELEASE.jar:5.0.7.RELEASE]atorg.springframework.security.config.annotation.web.configurers.AbstractAuthenticationFilterConfigurer.failureUrl(AbstractAuthenticationFilterConfigurer.java:212) [springsecurityconfig5.0.7.RELEASE.jar:5.0.7.RELEASE]atorg.springframework.security.config.annotation.web.configurers.AbstractAuthenticationFilterConfigurer.updateAuthenticationDefaults(AbstractAuthenticationFilterConfigurer.java:383) [springsecurityconfig5.0.7.RELEASE.jar:5.0.7.RELEASE]atorg.springframework.security.config.annotation.web.configurers.AbstractAuthenticationFilterConfigurer.loginPage(AbstractAuthenticationFilterConfigurer.java:314) [springsecurityconfig5.0.7.RELEASE.jar:5.0.7.RELEASE]atorg.springframework.security.config.annotation.web.configurers.FormLoginConfigurer.loginPage(FormLoginConfigurer.java:183) [springsecurityconfig5.0.7.RELEASE.jar:5.0.7.RELEASE]atcom.example.WebSecurityConfig.configure(WebSecurityConfig.java:21) [classes/:na]atorg.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.getHttp(WebSecurityConfigurerAdapter.java:230) [springsecurityconfig5.0.7.RELEASE.jar:5.0.7.RELEASE]atorg.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.init(WebSecurityConfigurerAdapter.java:321) [springsecurityconfig5.0.7.RELEASE.jar:5.0.7.RELEASE]atorg.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter.init(WebSecurityConfigurerAdapter.java:92) [springsecurityconfig5.0.7.RELEASE.jar:5.0.7.RELEASE]atcom.example.WebSecurityConfig E n h a n c e r B y S p r i n g C G L I B EnhancerBySpringCGLIB EnhancerBySpringCGLIB a a 41 e f 11. i n i t ( < g e n e r a t e d > )   [ 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 . c o n f i g . a n n o t a t i o n . A b s t r a c t C o n f i g u r e d S e c u r i t y B u i l d e r . i n i t ( A b s t r a c t C o n f i g u r e d S e c u r i t y B u i l d e r . j a v a : 371 )   [ s p r i n g − s e c u r i t y − c o n f i g − 5.0.7. R E L E A S E . j a r : 5.0.7. 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 . A b s t r a c t C o n f i g u r e d S e c u r i t y B u i l d e r . d o B u i l d ( A b s t r a c t C o n f i g u r e d S e c u r i t y B u i l d e r . j a v a : 325 )   [ s p r i n g − s e c u r i t y − c o n f i g − 5.0.7. R E L E A S E . j a r : 5.0.7. 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 . A b s t r a c t S e c u r i t y B u i l d e r . b u i l d ( A b s t r a c t S e c u r i t y B u i l d e r . j a v a : 41 )   [ s p r i n g − s e c u r i t y − c o n f i g − 5.0.7. R E L E A S E . j a r : 5.0.7. 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 a t i o n . 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 ( W e b S e c u r i t y C o n f i g u r a t i o n . j a v a : 104 )   [ s p r i n g − s e c u r i t y − c o n f i g − 5.0.7. R E L E A S E . j a r : 5.0.7. 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 a t i o n aa41ef11.init(<generated>) ~[classes/:na] at org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.init(AbstractConfiguredSecurityBuilder.java:371) ~[spring-security-config-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.doBuild(AbstractConfiguredSecurityBuilder.java:325) ~[spring-security-config-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.security.config.annotation.AbstractSecurityBuilder.build(AbstractSecurityBuilder.java:41) ~[spring-security-config-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration.springSecurityFilterChain(WebSecurityConfiguration.java:104) ~[spring-security-config-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration aa41ef11.init(<generated>) [classes/:na]atorg.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.init(AbstractConfiguredSecurityBuilder.java:371) [springsecurityconfig5.0.7.RELEASE.jar:5.0.7.RELEASE]atorg.springframework.security.config.annotation.AbstractConfiguredSecurityBuilder.doBuild(AbstractConfiguredSecurityBuilder.java:325) [springsecurityconfig5.0.7.RELEASE.jar:5.0.7.RELEASE]atorg.springframework.security.config.annotation.AbstractSecurityBuilder.build(AbstractSecurityBuilder.java:41) [springsecurityconfig5.0.7.RELEASE.jar:5.0.7.RELEASE]atorg.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration.springSecurityFilterChain(WebSecurityConfiguration.java:104) [springsecurityconfig5.0.7.RELEASE.jar:5.0.7.RELEASE]atorg.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration E n h a n c e r B y S p r i n g C G L I B EnhancerBySpringCGLIB EnhancerBySpringCGLIB 1 f 417 b b a . C G L I B 1f417bba.CGLIB 1f417bba.CGLIBspringSecurityFilterChain 2 ( < g e n e r a t e d > )   [ s p r i n g − s e c u r i t y − c o n f i g − 5.0.7. R E L E A S E . j a r : 5.0.7. 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 a t i o n 2(<generated>) ~[spring-security-config-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration 2(<generated>) [springsecurityconfig5.0.7.RELEASE.jar:5.0.7.RELEASE]atorg.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration E n h a n c e r B y S p r i n g C G L I B EnhancerBySpringCGLIB EnhancerBySpringCGLIB 1 f 417 b b a 1f417bba 1f417bba F a s t C l a s s B y S p r i n g C G L I B FastClassBySpringCGLIB FastClassBySpringCGLIB 2005 f 747. i n v o k e ( < g e n e r a t e d > )   [ s p r i n g − s e c u r i t y − c o n f i g − 5.0.7. R E L E A S E . j a r : 5.0.7. 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 g l i b . p r o x y . M e t h o d P r o x y . i n v o k e S u p e r ( M e t h o d P r o x y . j a v a : 228 )   [ s p r i n g − c o r e − 5.0.8. R E L E A S E . j a r : 5.0.8. 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 E n h a n c e r 2005f747.invoke(<generated>) ~[spring-security-config-5.0.7.RELEASE.jar:5.0.7.RELEASE] at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) ~[spring-core-5.0.8.RELEASE.jar:5.0.8.RELEASE] at org.springframework.context.annotation.ConfigurationClassEnhancer 2005f747.invoke(<generated>) [springsecurityconfig5.0.7.RELEASE.jar:5.0.7.RELEASE]atorg.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) [springcore5.0.8.RELEASE.jar:5.0.8.RELEASE]atorg.springframework.context.annotation.ConfigurationClassEnhancerBeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361) ~[spring-context-5.0.8.RELEASE.jar:5.0.8.RELEASE] at org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration E n h a n c e r B y S p r i n g C G L I B EnhancerBySpringCGLIB EnhancerBySpringCGLIB1f417bba.springSecurityFilterChain() ~[spring-security-config-5.0.7.RELEASE.jar:5.0.7.RELEASE] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_92] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_92] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_92] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_92] at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE] … 26 common frames omitted

转载请注明原文地址: https://www.6miu.com/read-3650196.html

最新回复(0)