Я пытаюсь включить поддержку Spring Autowiring в моем веб-сервисе, следуя указаниям
public class MyService extends SpringBeanAutowiringSupport implements SomeInterface {
private Dao dao;
@Autowired
public void setDao(Dao dao) {
this.dao = dao;
}
С классом MyService, помеченным
@WebService(endpointInterface = "SomeInterfacePath")
Однако, когда я пытаюсь запустить это, я получаю
java.lang.NoSuchMethodError: org.springframework.web.context.ContextLoader.getCurrentWebApplicationContext()Lorg/springframework/web/context/WebApplicationContext;
at org.springframework.web.context.support.SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(SpringBeanAutowiringSupport.java:81)
at org.springframework.web.context.support.SpringBeanAutowiringSupport.<init>(SpringBeanAutowiringSupport.java:68)
ошибка, решение которой я не смог найти. Я использую Spring 3.0 jar и apache-cxf. Spring autowiring работает в других местах моего проекта, но, похоже, здесь не очень хорошо. Есть идеи о том, что происходит? У меня есть конечная точка jaxws, определенная в appConfig как
<jaxws:endpoint
id="myendpoint"
implementor="MyService"
address="/helloworld
/>