Selaa lähdekoodia

公用和台州市立医院自诊环境配置

gaodm 5 vuotta sitten
vanhempi
commit
0d8362e43c

+ 7 - 0
config-server/src/main/resources/shared/gateway-service-dev.yml

@@ -142,6 +142,13 @@ spring:
         filters:
         #        - SwaggerHeaderFilter
         - StripPrefix=2
+      - id: zzcxtzsl-service
+        uri: lb://zzcxtzsl-service
+        predicates:
+        - Path=/api/zzcxtzsl/**
+        filters:
+        #        - SwaggerHeaderFilter
+        - StripPrefix=2
 server:
   port: 5050
 

+ 8 - 0
config-server/src/main/resources/shared/gateway-service-pro.yml

@@ -142,6 +142,14 @@ spring:
         filters:
         #        - SwaggerHeaderFilter
         - StripPrefix=2
+      - id: zzcxtzsl-service
+        uri: lb://zzcxtzsl-service
+        predicates:
+        - Path=/api/zzcxtzsl/**
+        filters:
+        #        - SwaggerHeaderFilter
+        - StripPrefix=2
+
 
 server:
   port: 5050

+ 100 - 0
config-server/src/main/resources/shared/zzcx-service-tzsl.yml

@@ -0,0 +1,100 @@
+server:
+  port: 8853
+
+# 驱动配置信息
+spring:
+  datasource:
+    druid:
+      driver-class-name: com.mysql.cj.jdbc.Driver
+      platform: mysql
+      url: jdbc:mysql://118.31.77.177:3306/sys-zzcx?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false
+      username: root
+      password: langtong
+      # 连接池的配置信息
+      # 初始化大小,最小,最大
+      initialSize: 5
+      minIdle: 5
+      maxActive: 20
+      # 配置获取连接等待超时的时间
+      maxWait: 60000
+      # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
+      timeBetweenEvictionRunsMillis: 60000
+      # 配置一个连接在池中最小生存的时间,单位是毫秒
+      minEvictableIdleTimeMillis: 300000
+      validationQuery: SELECT 1 FROM DUAL
+      testWhileIdle: true
+      testOnBorrow: false
+      testOnReturn: false
+      # 打开PSCache,并且指定每个连接上PSCache的大小
+      poolPreparedStatements: true
+      maxPoolPreparedStatementPerConnectionSize: 20
+      # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
+      filters.commons-log.connection-logger-name: wall,log4j
+      filter:
+        stat:
+          enabled: true
+          mergeSql: true
+          log-slow-sql: true
+          slow-sql-millis: 2000
+      #监控配置
+      web-stat-filter:
+        enabled: true
+        url-pattern: /*
+        exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
+
+      # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
+      stat-view-servlet:
+        enabled: true
+        url-pattern: /druid/*
+        reset-enable: false
+        login-username: root
+        login-password: root
+
+  cloud:
+    stream:
+      bindings:
+        outputLog:
+          destination: myLog
+  #          contentType: text/plain      # 实体 json string 在传递的类型装换 查看 http://docs.spring
+
+  #mq
+  rabbitmq:
+    host: 192.168.2.122
+    port: 5672
+    username: lantone
+    password: lantone
+    publisher-confirms: true
+    virtual-host: /
+
+#mybatis
+mybatis-plus:
+  mapper-locations: classpath:/mapper/*Mapper.xml
+  #实体扫描,多个package用逗号或者分号分隔
+  typeAliasesPackage: com.diagbot.entity
+  global-config:
+    #刷新mapper 调试神器
+    db-config:
+      #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
+      id-type: id_worker
+      #字段策略 0:"忽略判断",1:"非 NULL 判断"),2:"非空判断"
+      field-strategy: not_empty
+      #驼峰下划线转换
+      column-underline: true
+      #数据库大写下划线转换
+      #capital-mode: true
+      #刷新mapper 调试神器
+      refresh-mapper: true
+      #逻辑删除配置
+      logic-delete-value: 0
+      logic-not-delete-value: 1
+      #自定义填充策略接口实现
+      #meta-object-handler: com.baomidou.springboot.xxx
+      #自定义SQL注入器
+      #sql-injector: com.baomidou.springboot.xxx
+  configuration:
+    map-underscore-to-camel-case: true
+    cache-enabled: false
+
+io.github.lvyahui8.spring:
+  base-packages: com.diagbot.aggregate
+  thread-number: 12

+ 41 - 41
zzcx-service/src/main/java/com/diagbot/aop/SysLoggerAspect.java

@@ -1,41 +1,41 @@
-package com.diagbot.aop;
-
-import com.diagbot.biz.log.entity.SysLog;
-import com.diagbot.enums.SysTypeEnum;
-import com.diagbot.rabbit.MySender;
-import com.diagbot.util.AopUtil;
-import org.aspectj.lang.JoinPoint;
-import org.aspectj.lang.annotation.Aspect;
-import org.aspectj.lang.annotation.Before;
-import org.aspectj.lang.annotation.Pointcut;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
-import org.springframework.stereotype.Component;
-
-/**
- * @Description: 日志拦截切面
- * @author: gaodm
- * @time: 2018/8/2 13:36
- */
-@Aspect
-@Component
-@ConditionalOnProperty(prefix = "syslog", value = { "enable" }, havingValue = "true")
-public class SysLoggerAspect {
-    @Autowired
-    private MySender mySender;
-
-    @Pointcut("@annotation(com.diagbot.annotation.SysLogger)")
-    public void loggerPointCut() {
-
-    }
-
-    @Before("loggerPointCut()")
-    public void saveSysLog(JoinPoint joinPoint) {
-        //入参设置
-        SysLog sysLog = AopUtil.sysLoggerAspect(joinPoint, SysTypeEnum.ZZCX_SERVICE.getKey());
-        //保存系统日志
-        mySender.outputLogSend(sysLog);
-    }
-
-}
-
+//package com.diagbot.aop;
+//
+//import com.diagbot.biz.log.entity.SysLog;
+//import com.diagbot.enums.SysTypeEnum;
+//import com.diagbot.rabbit.MySender;
+//import com.diagbot.util.AopUtil;
+//import org.aspectj.lang.JoinPoint;
+//import org.aspectj.lang.annotation.Aspect;
+//import org.aspectj.lang.annotation.Before;
+//import org.aspectj.lang.annotation.Pointcut;
+//import org.springframework.beans.factory.annotation.Autowired;
+//import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+//import org.springframework.stereotype.Component;
+//
+///**
+// * @Description: 日志拦截切面
+// * @author: gaodm
+// * @time: 2018/8/2 13:36
+// */
+//@Aspect
+//@Component
+//@ConditionalOnProperty(prefix = "syslog", value = { "enable" }, havingValue = "true")
+//public class SysLoggerAspect {
+//    @Autowired
+//    private MySender mySender;
+//
+//    @Pointcut("@annotation(com.diagbot.annotation.SysLogger)")
+//    public void loggerPointCut() {
+//
+//    }
+//
+//    @Before("loggerPointCut()")
+//    public void saveSysLog(JoinPoint joinPoint) {
+//        //入参设置
+//        SysLog sysLog = AopUtil.sysLoggerAspect(joinPoint, SysTypeEnum.ZZCX_SERVICE.getKey());
+//        //保存系统日志
+//        mySender.outputLogSend(sysLog);
+//    }
+//
+//}
+//