作者:mobiledu2402851173 | 2023-08-29 21:35
1> maximdim..:
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.web.context.support.SpringBeanAutowiringSupport;
@WebService(
endpointInterface = "Bla",
targetNamespace = "http://bla/v001",
wsdlLocation = "WEB-INF/wsdl/bla.wsdl",
serviceName = "BlaService",
portName = "BlaPort")
public class BlaWs extends SpringBeanAutowiringSupport implements BlaPort {
@Autowired
@Qualifier("dao")
private Dao dao;
...
}
+1感谢您指向我的'SpringBeanAutowiringSupport`方向.我一直在努力让Glassfish放弃对JAX-WS的管理并让Spring接受它.这是一个更容易的解决方案,让Spring专注于它擅长的事情.