Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/user-interface/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java @webservices对象中的自动连线服务单例为空_Java_Spring - Fatal编程技术网

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
?如果没有,您需要添加
@组件
。我认为这个答案可能会有所帮助。