package com.docus.bgts.config; import com.docus.bgts.handler.ITBasicWebService; import com.docus.bgts.handler.TBasicWebService; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import javax.xml.ws.Endpoint; @Configuration public class WebServiceConfig { @Value("${system.code}") private String systemCode; @Value("${system.prop}") private String systemProp; //把实现类交给spring管理 @Bean public ITBasicWebService tBasicWebService() { return new TBasicWebService(); } @Bean public Endpoint endpoint() { System.out.println("-----------------------web service服务已发布-------------------------"); // String address = "http://"+"0.0.0.0"+":" + Codes.EXTERNAL.getCode()+"/" + Codes.EXTERNAL.getMessage(); String address = "http://"+"0.0.0.0"+":" + systemProp+"/" + systemCode; Endpoint publish = Endpoint.publish(address, tBasicWebService()); System.out.println(" "+address); return publish; } }