Hi, everyone
      I'm new developer to CAS. I downloaded CAS7.0.0.RC3 with CAS 
Initliazr to test. I defined a AutowiredTestService.java as below.
 
package org.apereo.cas.config;
import org.springframework.stereotype.Service;

@Service
public class AutowiredTestService {
    public AutowiredTestService(){
        System.out.println("AutowiredTestService is constructed....");
    }
}

But Idea reports "Could not autowire" when I tried to Autowired this 
service in Autowired annotation.

package org.apereo.cas.config;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.AutoConfiguration;

@AutoConfiguration
//@EnableConfigurationProperties(CasConfigurationProperties.class)
public class CasOverlayOverrideConfiguration {
    @Autowired
    public AutowiredTestService autowiredTestService;

}

And after I tried to run CAS in tomcat, following error is reported out. 
    Caused by: 
org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
creating bean with name 
'org.apereo.cas.config.CasOverlayOverrideConfiguration': Unsatisfied 
dependency expressed through field 'autowiredTestService': No qualifying 
bean of type 'org.apereo.cas.config.AutowiredTestService' available: 
expected at least 1 bean which qualifies as autowire candidate. Dependency 
annotations: 
{@org.springframework.beans.factory.annotation.Autowired(required=true)}

Would you like to let me know how to fix it? Thank you very much.

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/76b429a6-f7e3-4b0f-9acd-ae3c60b60758n%40apereo.org.

Reply via email to