小编Clé*_*ira的帖子

<method>中方法setUserService的参数0需要一个无法找到的类型为<service>的bean

我经历过这个问题并且无法找到正在发生的事情....尝试@ComponentScan,尝试命名我的服务,似乎没有工作.

错误:

03:35:05,193 WARN  [org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext] (ServerService Thread Pool -- 81) Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'securityConfiguration': Unsatisfied dependency expressed through method 'setAuthenticationProvider' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'daoAuthenticationProvider' defined in class path resource [com/ipayso/config/SecurityConfiguration.class]: Unsatisfied dependency expressed through method 'daoAuthenticationProvider' parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userDetailsService': Unsatisfied dependency expressed through method 'setUserService' parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: …
Run Code Online (Sandbox Code Playgroud)

java spring-security autowired spring-boot

7
推荐指数
1
解决办法
3万
查看次数

标签 统计

autowired ×1

java ×1

spring-boot ×1

spring-security ×1