Pārlūkot izejas kodu

fix 修改启动问题

daiyihua 1 gadu atpakaļ
vecāks
revīzija
3fb2f0def5

+ 3 - 0
ywt-platform-outpatient-taihe-rpc/src/main/java/com/ywt/outpatient/taihe/rpc/core/SqlHelper.java

@@ -3,11 +3,14 @@ package com.ywt.outpatient.taihe.rpc.core;
 import com.ywt.outpatient.taihe.rpc.core.utils.StringHelper;
 import com.ywt.outpatient.taihe.rpc.core.utils.StringHelper;
 import org.springframework.jdbc.core.BeanPropertyRowMapper;
 import org.springframework.jdbc.core.BeanPropertyRowMapper;
 import org.springframework.jdbc.core.JdbcTemplate;
 import org.springframework.jdbc.core.JdbcTemplate;
+import org.springframework.stereotype.Component;
 
 
 import javax.persistence.Table;
 import javax.persistence.Table;
 import java.util.List;
 import java.util.List;
 
 
 
 
+
+@Component
 public class SqlHelper {
 public class SqlHelper {
     JdbcTemplate jdbcTemplate;
     JdbcTemplate jdbcTemplate;
 
 

+ 2 - 1
ywt-platform-outpatient-taihe-rpc/src/main/java/com/ywt/outpatient/taihe/rpc/provider/TaiheOutpatientProvider.java

@@ -30,6 +30,7 @@ import com.ywt.outpatient.taihe.rpc.service.IdGenerator;
 import com.ywt.outpatient.taihe.rpc.service.common.ConfigProvider;
 import com.ywt.outpatient.taihe.rpc.service.common.ConfigProvider;
 import com.ywt.outpatient.taihe.rpc.domain.entity.center.MedicalCard;
 import com.ywt.outpatient.taihe.rpc.domain.entity.center.MedicalCard;
 import org.apache.dubbo.config.annotation.DubboReference;
 import org.apache.dubbo.config.annotation.DubboReference;
+import org.apache.dubbo.config.annotation.DubboService;
 import org.slf4j.Logger;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -52,7 +53,7 @@ import java.util.stream.Collectors;
  * @author johnson lin
  * @author johnson lin
  * @date 2019-05-29 3:31 PM
  * @date 2019-05-29 3:31 PM
  */
  */
-@Service
+@DubboService
 public class TaiheOutpatientProvider extends DubboTaiheOutpatientServiceTriple.TaiheOutpatientServiceImplBase{
 public class TaiheOutpatientProvider extends DubboTaiheOutpatientServiceTriple.TaiheOutpatientServiceImplBase{
     private static Logger logger = LoggerFactory.getLogger(TaiheOutpatientProvider.class);
     private static Logger logger = LoggerFactory.getLogger(TaiheOutpatientProvider.class);
 
 

+ 4 - 4
ywt-platform-outpatient-taihe-rpc/src/main/resources/application.yml

@@ -26,10 +26,10 @@ spring:
       driver-class-name: com.mysql.jdbc.Driver
       driver-class-name: com.mysql.jdbc.Driver
       username: ywt_qa
       username: ywt_qa
       password: Ywtqa123456x*#
       password: Ywtqa123456x*#
-      initialSize: 10
-      maxActive: 2000
+      initialSize: 1
+      maxActive: 10
       minIdle: 1
       minIdle: 1
-      maximumPoolSize: 200
+      maximumPoolSize: 10
       autoCommit: true
       autoCommit: true
       poolName: HikariPool_center
       poolName: HikariPool_center
       maxLifetime: 1800000
       maxLifetime: 1800000
@@ -46,7 +46,7 @@ dubbo:
       namespace: @nacos.namespace@
       namespace: @nacos.namespace@
   protocol:  #协议  消费者端可不配置
   protocol:  #协议  消费者端可不配置
     name: tri  #远triple协议
     name: tri  #远triple协议
-    port: 20006  #端口
+    port: 20009  #端口
   consumer:
   consumer:
     #远程服务调用重试次数,不包括第一次调用,不需要重试请设为0
     #远程服务调用重试次数,不包括第一次调用,不需要重试请设为0
     retries: 0
     retries: 0