webservice cxf和项目启动时同时发布 发布玩服务之后怎样关闭 只关闭webservice 服务 不能停止项目

webservice cxf和项目启动时同时发布 发布玩服务之后怎样关闭 只关闭webservice 服务 不能停止项目

package cn.web.webservice;
import javax.annotation.PostConstruct;
import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
import org.springframework.stereotype.Component;
import cn.web.webservice.server.CxfService;
import cn.web.webservice.server.CxfServiceImpl;
@Component
public class WebService {



    private static final String address ="http://localhost:8088/smartassets/cxf";

    static CxfService sync = new CxfServiceImpl();

    @PostConstruct
    public void initialize() { 

                        JaxWsServerFactoryBean jwsFactory = new JaxWsServerFactoryBean();
                        jwsFactory.setAddress(address);   //指定WebService的发布地址
                        jwsFactory.setServiceClass(CxfService.class);//WebService对应的类型
                        jwsFactory.setServiceBean(sync);//WebService对应的实现对象
                         //发布服务
                        jwsFactory.create();

    }

}

https://blog.csdn.net/Try_harder_every_day/article/details/79044374