hi i faced below error in spring security application,i cant upload details company restricting big upload ,
what is the problem?
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘accessConfirmationController’: I
njection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void o
rg.springframework.security.oauth.examples.sparklr.mvc.AccessConfirmationController.setAuthenticationCache(org.springframework.security.oauth2.provider.code.Cli
entAuthenticationCache); nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [org.springframework.secu
rity.oauth2.provider.code.ClientAuthenticationCache] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. D
ependency annotations: {}:
org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [org.springframework.security.oauth2.provider.code.ClientAuthenticatio
nCache] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotation
From your log , you should have a Class called
AccessConfirmationController.It has an internal property whose type isClientAuthenticationCache, right?The error says you do not define any beans whose type is
ClientAuthenticationCache, so theAccessConfirmationControllerbean cannot be created too.You could use the Spring ‘s component scanning feature to automatically detect and instantiate the
ClientAuthenticationCache.To enable the component scanning feature , add
<context:component-scan base-package="some.package">in theapplicationContext.xml.Any classes in the specifiedbase-packageand its sub-packages that are annotated with @Component subtypes such as @Controller,@Repository, @Service can automatically discovered and instantiated by Spring.