Java @webservices对象中的自动连线服务单例为空
在我的服务项目中,我定义了:Java @webservices对象中的自动连线服务单例为空,java,spring,Java,Spring,在我的服务项目中,我定义了: package fr.gipmds.fpoc.service; @Service("FpocServices") public class FpocServicesImpl implements FpocServices { 哪个实现 package fr.gipmds.fpoc.service; @Service public interface FpocServices { 在我的webservice项目中,我已使用此服务的实例定义了一个webservice
package fr.gipmds.fpoc.service;
@Service("FpocServices")
public class FpocServicesImpl implements FpocServices {
哪个实现
package fr.gipmds.fpoc.service;
@Service
public interface FpocServices {
在我的webservice项目中,我已使用此服务的实例定义了一个webservice类:
package fr.gipmds.fpoc.controller.webservices.ficheparametrage.impl;
@WebService(serviceName = "PublierFicheParametrageService",
portName = "PublierFicheParametragePort",
targetNamespace = "http://ws.fpoc.gipmds.fr/",
endpointInterface = "fr.gipmds.fpoc.controller.webservices.ficheparametrage.PublierFicheParametrage")
public class PublierFicheParametrageImpl implements PublierFicheParametrage {
@Autowired
private FpocServices fpocServices;
public Retour publier()
if (!fpocServices.existeFiche(idFiche)) {
在父项目中,我还有:
<context:component-scan base-package="fr.gipmds.fpoc"
use-default-filters="true">
</context:component-scan>
但是当我调试代码时,fpocServices仍然为null。我忘记声明和/或实例了什么?spring是否扫描
@WebService
?如果没有,您需要添加@组件
。我认为这个答案可能会有所帮助。