You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.1 KiB
Java

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;
}
}