From bea2720f9fe34a511789b5c73b5cb86b554fa21b Mon Sep 17 00:00:00 2001 From: tanzherong <985006933@qq.com> Date: Mon, 21 Mar 2022 21:51:08 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=AB=AF=E5=8F=A3=E4=BB=A5?= =?UTF-8?q?=E5=8F=8A=E6=9C=8D=E5=8A=A1=E5=90=8D=E5=8F=B7=E8=AF=BB=E5=8F=96?= =?UTF-8?q?=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/docus/webservice/config/WebServiceConfig.java | 9 +++++++-- docus-webservice/src/main/resources/application.yml | 6 +++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/docus-webservice/src/main/java/com/docus/webservice/config/WebServiceConfig.java b/docus-webservice/src/main/java/com/docus/webservice/config/WebServiceConfig.java index 68c6afa..68fe8c8 100644 --- a/docus-webservice/src/main/java/com/docus/webservice/config/WebServiceConfig.java +++ b/docus-webservice/src/main/java/com/docus/webservice/config/WebServiceConfig.java @@ -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; diff --git a/docus-webservice/src/main/resources/application.yml b/docus-webservice/src/main/resources/application.yml index 053a34e..e9e8a8f 100644 --- a/docus-webservice/src/main/resources/application.yml +++ b/docus-webservice/src/main/resources/application.yml @@ -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 \ No newline at end of file + 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