[
https://issues.apache.org/jira/browse/SHIRO-627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16113896#comment-16113896
]
Chad B commented on SHIRO-627:
------------------------------
*I'm also getting:* Caused by:
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named
'authorizer' available
*What other things are required for creating a custom realm with spring boot?
I basically remade this class:
https://github.com/antoniomaria/shiro-jpa/blob/master/src/main/java/net/sf/lab/shiro/realm/JPARealm.java
*
I have:
(A class that extends AuthorizingRealm)
@Component
public class SMUserAuthenticatingJPARealm extends AuthorizingRealm
*Getting this:*
ShiroWebAutoConfiguration#authorizer:
Did not match:
- @ConditionalOnMissingBean (types: org.apache.shiro.authz.Authorizer;
SearchStrategy: all) found bean 'SMUserAuthenticatingJPARealm' (OnBeanCondition)
Description:
Parameter 0 of method authorizationAttributeSourceAdvisor in
org.apache.shiro.spring.boot.autoconfigure.ShiroAnnotationProcessorAutoConfiguration
required a bean named 'authorizer' that could not be found.
Action:
Consider defining a bean named 'authorizer' in your configuration.
I'm using:
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-spring-boot-web-starter</artifactId>
<version>1.4.0</version>
</dependency>
and
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.6.RELEASE</version>
<relativePath></relativePath>
</parent>
*and the stack trace:*
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named
'authorizer' available
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:687)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1207)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:284)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.obtainBeanInstanceFromFactory(ConfigurationClassEnhancer.java:389)
~[spring-context-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:361)
~[spring-context-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.apache.shiro.spring.config.web.autoconfigure.ShiroWebAutoConfiguration$$EnhancerBySpringCGLIB$$f889331e.authorizer(<generated>)
~[shiro-spring-boot-web-starter-1.4.0.jar:1.4.0]
at
org.apache.shiro.spring.config.AbstractShiroConfiguration.securityManager(AbstractShiroConfiguration.java:70)
~[shiro-spring-1.4.0.jar:1.4.0]
at
org.apache.shiro.spring.config.web.autoconfigure.ShiroWebAutoConfiguration.securityManager(ShiroWebAutoConfiguration.java:120)
~[shiro-spring-boot-web-starter-1.4.0.jar:1.4.0]
at
org.apache.shiro.spring.config.web.autoconfigure.ShiroWebAutoConfiguration$$EnhancerBySpringCGLIB$$f889331e.CGLIB$securityManager$0(<generated>)
~[shiro-spring-boot-web-starter-1.4.0.jar:1.4.0]
at
org.apache.shiro.spring.config.web.autoconfigure.ShiroWebAutoConfiguration$$EnhancerBySpringCGLIB$$f889331e$$FastClassBySpringCGLIB$$19cf840b.invoke(<generated>)
~[shiro-spring-boot-web-starter-1.4.0.jar:1.4.0]
at
org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
~[spring-core-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358)
~[spring-context-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.apache.shiro.spring.config.web.autoconfigure.ShiroWebAutoConfiguration$$EnhancerBySpringCGLIB$$f889331e.securityManager(<generated>)
~[shiro-spring-boot-web-starter-1.4.0.jar:1.4.0]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
~[na:1.8.0_131]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
~[na:1.8.0_131]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
~[na:1.8.0_131]
at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_131]
at
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1138)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:467)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1173)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1067)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.aop.framework.autoproxy.BeanFactoryAdvisorRetrievalHelper.findAdvisorBeans(BeanFactoryAdvisorRetrievalHelper.java:92)
~[spring-aop-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findCandidateAdvisors(AbstractAdvisorAutoProxyCreator.java:102)
~[spring-aop-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.aop.aspectj.annotation.AnnotationAwareAspectJAutoProxyCreator.findCandidateAdvisors(AnnotationAwareAspectJAutoProxyCreator.java:88)
~[spring-aop-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.aop.aspectj.autoproxy.AspectJAwareAdvisorAutoProxyCreator.shouldSkip(AspectJAwareAdvisorAutoProxyCreator.java:103)
~[spring-aop-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessBeforeInstantiation(AbstractAutoProxyCreator.java:248)
~[spring-aop-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:1037)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.resolveBeforeInstantiation(AbstractAutowireCapableBeanFactory.java:1011)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:473)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
~[spring-beans-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:235)
~[spring-context-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:703)
~[spring-context-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:528)
~[spring-context-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)
~[spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
at
org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)
~[spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
at
org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
~[spring-boot-1.5.6.RELEASE.jar:1.5.6.RELEASE]
at
org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:120)
[spring-boot-test-1.5.6.RELEASE.jar:1.5.6.RELEASE]
at
org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:98)
[spring-test-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:116)
[spring-test-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:83)
[spring-test-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:189)
[spring-test-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:131)
[spring-test-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:230)
[spring-test-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:228)
[spring-test-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:287)
[spring-test-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
[junit-4.12.jar:4.12]
at
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:289)
[spring-test-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:247)
[spring-test-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94)
[spring-test-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
[junit-4.12.jar:4.12]
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
[junit-4.12.jar:4.12]
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
[junit-4.12.jar:4.12]
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
[junit-4.12.jar:4.12]
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
[junit-4.12.jar:4.12]
at
org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
[spring-test-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
[spring-test-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
[junit-4.12.jar:4.12]
at
org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:191)
[spring-test-4.3.10.RELEASE.jar:4.3.10.RELEASE]
at
org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
[.cp/:na]
at
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
[.cp/:na]
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
[.cp/:na]
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
[.cp/:na]
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
[.cp/:na]
at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
[.cp/:na]
Any ideas? This is the only thread I could find for this error (8/3/2017)
> something wrong with shiro-spring-boot-web-starter,it did not auto register
> securityManager???
> ----------------------------------------------------------------------------------------------
>
> Key: SHIRO-627
> URL: https://issues.apache.org/jira/browse/SHIRO-627
> Project: Shiro
> Issue Type: Question
> Components: Sample Apps
> Affects Versions: 1.4.0
> Environment: windows 7 64bit
> jdk 1.8
> Reporter: hujie
> Labels: starter
> Fix For: 1.4.0
>
>
> {code}
> 2017-06-26 19:59:22.126 INFO 6576 --- [ main]
> c.p.s.Jsr303HibernateValidateApplication : Starting
> Jsr303HibernateValidateApplication on hujie-PC with PID 6576
> (D:\jee-git-repo\study\JSR303-Hibernate-Validate\target\classes started by
> hujie in D:\jee-git-repo\study\JSR303-Hibernate-Validate)
> 2017-06-26 19:59:22.150 INFO 6576 --- [ main]
> c.p.s.Jsr303HibernateValidateApplication : No active profile set, falling
> back to default profiles: default
> 2017-06-26 19:59:22.232 INFO 6576 --- [ main]
> ationConfigEmbeddedWebApplicationContext : Refreshing
> org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@539d019:
> startup date [Mon Jun 26 19:59:22 CST 2017]; root of context hierarchy
> 2017-06-26 19:59:23.586 INFO 6576 --- [ main]
> trationDelegate$BeanPostProcessorChecker : Bean
> 'org.apache.shiro.spring.boot.autoconfigure.ShiroBeanAutoConfiguration' of
> type [class
> org.apache.shiro.spring.boot.autoconfigure.ShiroBeanAutoConfiguration$$EnhancerBySpringCGLIB$$51c46c26]
> is not eligible for getting processed by all BeanPostProcessors (for
> example: not eligible for auto-proxying)
> 2017-06-26 19:59:23.624 INFO 6576 --- [ main]
> trationDelegate$BeanPostProcessorChecker : Bean 'eventBus' of type [class
> org.apache.shiro.event.support.DefaultEventBus] is not eligible for getting
> processed by all BeanPostProcessors (for example: not eligible for
> auto-proxying)
> 2017-06-26 19:59:23.730 INFO 6576 --- [ main]
> trationDelegate$BeanPostProcessorChecker : Bean
> 'org.apache.shiro.spring.config.web.autoconfigure.ShiroWebAutoConfiguration'
> of type [class
> org.apache.shiro.spring.config.web.autoconfigure.ShiroWebAutoConfiguration$$EnhancerBySpringCGLIB$$7660cc90]
> is not eligible for getting processed by all BeanPostProcessors (for
> example: not eligible for auto-proxying)
> 2017-06-26 19:59:23.772 INFO 6576 --- [ main]
> trationDelegate$BeanPostProcessorChecker : Bean 'localRealm' of type [class
> cn.points.study.shiro.realms.LocalRealm$$EnhancerBySpringCGLIB$$b0c600bf] is
> not eligible for getting processed by all BeanPostProcessors (for example:
> not eligible for auto-proxying)
> 2017-06-26 19:59:24.032 INFO 6576 --- [ main]
> trationDelegate$BeanPostProcessorChecker : Bean 'sessionStorageEvaluator' of
> type [class org.apache.shiro.web.mgt.DefaultWebSessionStorageEvaluator] is
> not eligible for getting processed by all BeanPostProcessors (for example:
> not eligible for auto-proxying)
> 2017-06-26 19:59:24.034 INFO 6576 --- [ main]
> trationDelegate$BeanPostProcessorChecker : Bean 'subjectDAO' of type [class
> org.apache.shiro.mgt.DefaultSubjectDAO] is not eligible for getting processed
> by all BeanPostProcessors (for example: not eligible for auto-proxying)
> 2017-06-26 19:59:24.038 INFO 6576 --- [ main]
> trationDelegate$BeanPostProcessorChecker : Bean 'subjectFactory' of type
> [class org.apache.shiro.web.mgt.DefaultWebSubjectFactory] is not eligible for
> getting processed by all BeanPostProcessors (for example: not eligible for
> auto-proxying)
> 2017-06-26 19:59:24.044 INFO 6576 --- [ main]
> trationDelegate$BeanPostProcessorChecker : Bean 'rememberMeCookieTemplate' of
> type [class org.apache.shiro.web.servlet.SimpleCookie] is not eligible for
> getting processed by all BeanPostProcessors (for example: not eligible for
> auto-proxying)
> 2017-06-26 19:59:24.049 INFO 6576 --- [ main]
> trationDelegate$BeanPostProcessorChecker : Bean 'rememberMeManager' of type
> [class org.apache.shiro.web.mgt.CookieRememberMeManager] is not eligible for
> getting processed by all BeanPostProcessors (for example: not eligible for
> auto-proxying)
> 2017-06-26 19:59:24.055 INFO 6576 --- [ main]
> trationDelegate$BeanPostProcessorChecker : Bean 'authenticationStrategy' of
> type [class org.apache.shiro.authc.pam.AtLeastOneSuccessfulStrategy] is not
> eligible for getting processed by all BeanPostProcessors (for example: not
> eligible for auto-proxying)
> 2017-06-26 19:59:24.060 INFO 6576 --- [ main]
> trationDelegate$BeanPostProcessorChecker : Bean 'authenticator' of type
> [class org.apache.shiro.authc.pam.ModularRealmAuthenticator] is not eligible
> for getting processed by all BeanPostProcessors (for example: not eligible
> for auto-proxying)
> 2017-06-26 19:59:24.062 WARN 6576 --- [ main]
> ationConfigEmbeddedWebApplicationContext : Exception encountered during
> context initialization - cancelling refresh attempt:
> org.springframework.beans.factory.UnsatisfiedDependencyException: Error
> creating bean with name
> 'org.apache.shiro.spring.config.web.autoconfigure.ShiroWebFilterConfiguration':
> Unsatisfied dependency expressed through field 'securityManager'; nested
> exception is org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'securityManager' defined in class path resource
> [org/apache/shiro/spring/config/web/autoconfigure/ShiroWebAutoConfiguration.class]:
> Bean instantiation via factory method failed; nested exception is
> org.springframework.beans.BeanInstantiationException: Failed to instantiate
> [org.apache.shiro.mgt.SessionsSecurityManager]: Factory method
> 'securityManager' threw exception; nested exception is
> org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
> named 'authorizer' is defined
> 2017-06-26 19:59:24.143 ERROR 6576 --- [ main]
> o.s.b.d.LoggingFailureAnalysisReporter :
> ***************************
> APPLICATION FAILED TO START
> ***************************
> Description:
> Field securityManager in
> org.apache.shiro.spring.web.config.AbstractShiroWebFilterConfiguration
> required a bean named 'authorizer' that could not be found.
> {code}
> ********************************************************************************8
> {code}
> my boot properties :
> shiro.enabled=true
> shiro.web.enabled=true
> shiro.annotations.enabled=false
> shiro.loginUrl=/login.html
> shiro.successUrl=/
> shiro.unauthorizedUrl=/unauthorizedUrl.html
> shiro.userNativeSessionManager=true
> {code}
> I read code of shiro-spring-boot-web-starter,and
> shiro-spring-boot-starter,and i register one bean ,type of realm.
> {color:red}but I debug found there is not have securityManager???{color}
> why shiro samples did not register securityManager bean,but it can runing,
> sorry about my english.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)