Class ModuleSecurityService

java.lang.Object
com.easydesk.modules.security.ModuleSecurityService
All Implemented Interfaces:
SecurityService

@Service("moduleSecurityService") public class ModuleSecurityService extends Object implements SecurityService
예전: Map<String,String> configuredAdaptors 를 받아서 Class.forName(className).getDeclaredConstructor().newInstance() 로 각 Manager 를 리플렉션으로 생성 -> UserManagerAdaptor 처럼 생성자에 의존성 (CredentialService 등)이 필요한 adaptor 는 더 이상 이 방식으로 만들 수 없음. 이후: 각 XxxManagerAdaptor 를 스프링 빈(@Component)으로 두고, DefaultSecurityService 는 그 인터페이스들을 생성자 주입만 받는다. -> 어떤 adaptor 가 어떤 의존성을 갖든(CredentialService 든 뭐든) 스프링 컨테이너가 알아서 만들어주므로 DefaultSecurityService 는 더 이상 "어떻게 만들지" 를 몰라도 된다 (책임 분리). 이 클래스 자체도 @Service 로 스프링 빈이 되므로, 컨슈머(데모/테스트)는