Spring autowire a stubbed service - duplicate bean
问题 Ok. We have the need to @Autowire a different webservice on-the-fly (preferably by toggling a JNDI setting on the webserver) and I'm at a loss on how to do this. This is the way I was approaching the problems.. Two packages: com.mycomp.service.stub com.mycomp.service.impl One package contains MyServiceStub.java while implement MyService The other package contains MyServiceImpl.java, which implements same My controller, which requires MyService, has the bean defined as such @Autowire private