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.

40 lines
1.1 KiB
Java

4 years ago
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;
4 years ago
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());
4 years ago
@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;
4 years ago
Endpoint publish = Endpoint.publish(address, tBasicWebService());
log.info(" " + address);
4 years ago
return publish;
}
}