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.
|
|
|
package com.docus.bgts.config;
|
|
|
|
|
|
|
|
import com.docus.bgts.handler.ITBasicWebService;
|
|
|
|
import com.docus.bgts.handler.TBasicWebService;
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
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 {
|
|
|
|
|
|
|
|
private final Logger log = LoggerFactory.getLogger(getClass());
|
|
|
|
|
|
|
|
@Value("${system.code}")
|
|
|
|
private String systemCode;
|
|
|
|
@Value("${system.prop}")
|
|
|
|
private String systemProp;
|
|
|
|
|
|
|
|
//把实现类交给spring管理
|
|
|
|
@Bean
|
|
|
|
public ITBasicWebService tBasicWebService() {
|
|
|
|
return new TBasicWebService();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Bean
|
|
|
|
public Endpoint endpoint() {
|
|
|
|
|
|
|
|
log.info(" web service服务已发布 ");
|
|
|
|
String address = "http://" + "0.0.0.0" + ":" + systemProp + "/" + systemCode;
|
|
|
|
Endpoint publish = Endpoint.publish(address, tBasicWebService());
|
|
|
|
log.info(" " + address);
|
|
|
|
return publish;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|