修改端口以及服务名号读取方式

docus_webservice_1.1
谭哲荣 3 years ago
parent dfa10b03f4
commit bea2720f9f

@ -3,6 +3,8 @@ package com.docus.webservice.config;
import com.docus.webservice.enums.Codes;
import com.docus.webservice.handler.ITBasicWebService;
import com.docus.webservice.handler.TBasicWebService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@ -15,11 +17,14 @@ public class WebServiceConfig {
public ITBasicWebService tBasicWebService() {
return new TBasicWebService();
}
@Value("${ws.prot}")
private String prot;
@Value("${ws.prot}")
private String parameter;
@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"+":" + prot+"/" + parameter;
Endpoint publish = Endpoint.publish(address, tBasicWebService());
System.out.println(" "+address);
return publish;

@ -16,4 +16,8 @@ spring:
driver-class-name: com.mysql.cj.jdbc.Driver
username: docus
password: docus702
url: jdbc:mysql://db.docus.cn:3306/docus_medicalrecord?characterEncoding=utf8&useSSL=false&rewriteBatchedStatements=true&serverTimezone=Asia/Shanghai
url: jdbc:mysql://db.docus.cn:3306/docus_medicalrecord?characterEncoding=utf8&useSSL=false&rewriteBatchedStatements=true&serverTimezone=Asia/Shanghai
ws:
prot: 9201
parameter: docus_tBasic_data

Loading…
Cancel
Save