출처 : http://stackoverflow.com/questions/5152686/self-injection-with-spring


@Service
public class UserService implements Service {

    @Autowired
    private ApplicationContext applicationContext;

    private Service self;

    @PostConstruct
    private void init() {
        self = applicationContext.getBean(UserService.class);
    }
}


+ Recent posts