Spring Security 异常 Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named ‘myUserDetailService’ is defined

Spring Security 新版本已经不再建议使用 password-encoder了


  
          
        	
        	
        
      

跟着网上的例子写


  
          
		 
      

提示:
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named ‘myUserDetailService’ is defined

注解了但还是找不到,如果写成 的形式,里面的dao也无法自动注入.

发现最后居然是因为:aspectj版本低啊! 原来写的1.5.4,写最新的就解决了….



    org.aspectj
    aspectjweaver
    1.8.3


    org.aspectj
    aspectjrt
    1.8.3


发表评论