Browse Source

修改架构目录结构,同时兼容oracle和mysql

wj 5 years ago
parent
commit
5831fab363

+ 1 - 1
src/main/resources/bootstrap.yml

@@ -12,7 +12,7 @@ spring:
       server:
         native:
 #          search-locations: classpath:/config/
-          search-locations: ${CONFIG_PATH:classpath:/config/oracle/}
+          search-locations: ${CONFIG_PATH:classpath:/config/}
 
 # 注册中心配置
 eureka:

+ 4 - 0
src/main/resources/config/mysql/application-dev.yml

@@ -108,6 +108,10 @@ security:
     resource:
       loadBalanced: true
       token-info-uri: http://tofly-auth/oauth/check_token
+    client:
+      client-id: ENC(uRVGfvAwW6FVQJm/GC7v0A==)  #tofly
+      client-secret: ENC(w5AYCtwwgd+zVwGc5AudCw==)
+      scope: server
 
 ftp:
   enable: true

+ 0 - 56
src/main/resources/config/mysql/tofly-base-dev.yml

@@ -1,56 +0,0 @@
-security:
-  oauth2:
-    client:
-      client-id: ENC(uRVGfvAwW6FVQJm/GC7v0A==)  #tofly
-      client-secret: ENC(w5AYCtwwgd+zVwGc5AudCw==)
-      scope: server
-
-# 数据源
-spring:
-  datasource:
-    url: jdbc:oracle:thin:@tofly-db:1521/orcl
-    driver-class-name: oracle.jdbc.OracleDriver
-#    driver-class-name: oracle.jdbc.driver.OracleDriver
-    username: tf_dyrq_sms
-    password: tf_dyrq_sms
-    type: com.alibaba.druid.pool.DruidDataSource
-    druid:
-      initial-size: 10
-      min-idle: 1
-      max-active: 100
-      max-wait: 60000
-      time-between-eviction-runsMillis: 60000
-      min-evictable-idle-timeMillis: 300000
-      validation-query: select 1 FROM DUAL
-      test-while-idle: true
-      test-on-borrow: false
-      test-on-return: false
-      pool-prepared-statements: true
-      max-open-prepared-statements: 20
-      max-pool-prepared-statement-per-connection-size: 20
-      filters:
-        stat:
-          log-slow-sql: true
-          slow-sql-millis: 5000
-          merge-sql: false
-        wall:
-          config:
-            multi-statement-allow: true
-#      connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
-      use-global-data-source-stat: true
-
-
-
-tofly-filter:
-  urls:
-    - /user/info/**
-    - /applog**
-    - /v2/api-docs
-    - /getAsciiDocs**
-    - /getMarkdownDocs**
-    - /log/add*
-    - /swagger2word/**
-    - /actuator/**
-    - /ftpfiles/saveBatch
-
-

+ 0 - 54
src/main/resources/config/mysql/tofly-dyrq-dev.yml

@@ -1,54 +0,0 @@
-security:
-  oauth2:
-    client:
-      client-id: ENC(uRVGfvAwW6FVQJm/GC7v0A==)  #tofly
-      client-secret: ENC(w5AYCtwwgd+zVwGc5AudCw==)
-      scope: server
-
-
-
-
-# 数据源
-spring:
-  datasource:
-    url: jdbc:oracle:thin:@tofly-db:1521/orcl
-    driver-class-name: oracle.jdbc.OracleDriver
-#    driver-class-name: oracle.jdbc.driver.OracleDriver
-    username: tf_dyrq
-    password: tf_dyrq
-    type: com.alibaba.druid.pool.DruidDataSource
-    druid:
-      initial-size: 10
-      min-idle: 1
-      max-active: 100
-      max-wait: 60000
-      time-between-eviction-runsMillis: 60000
-      min-evictable-idle-timeMillis: 300000
-      validation-query: select 1 FROM DUAL
-      test-while-idle: true
-      test-on-borrow: false
-      test-on-return: false
-      pool-prepared-statements: true
-      max-open-prepared-statements: 20
-      max-pool-prepared-statement-per-connection-size: 20
-      filters:
-        stat:
-          log-slow-sql: true
-          slow-sql-millis: 5000
-          merge-sql: false
-        wall:
-          config:
-            multi-statement-allow: true
-      #      connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
-      use-global-data-source-stat: true
-
-
-tofly-filter:
-  urls:
-    - /v2/api-docs
-    - /load*
-    - /getAsciiDocs**
-    - /getMarkdownDocs**
-    - /actuator/**
-
-

+ 0 - 54
src/main/resources/config/mysql/tofly-xnkd-dev.yml

@@ -1,54 +0,0 @@
-security:
-  oauth2:
-    client:
-      client-id: ENC(uRVGfvAwW6FVQJm/GC7v0A==)  #tofly
-      client-secret: ENC(w5AYCtwwgd+zVwGc5AudCw==)
-      scope: server
-
-
-
-
-# 数据源
-spring:
-  datasource:
-    url: jdbc:oracle:thin:@tofly-db:1521/orcl
-    driver-class-name: oracle.jdbc.OracleDriver
-#    driver-class-name: oracle.jdbc.driver.OracleDriver
-    username: ENC(WBFkp9ghIuzp3jp9z5IT4w==)
-    password: ENC(WBFkp9ghIuzp3jp9z5IT4w==)
-    type: com.alibaba.druid.pool.DruidDataSource
-    druid:
-      initial-size: 10
-      min-idle: 1
-      max-active: 100
-      max-wait: 60000
-      time-between-eviction-runsMillis: 60000
-      min-evictable-idle-timeMillis: 300000
-      validation-query: select 1 FROM DUAL
-      test-while-idle: true
-      test-on-borrow: false
-      test-on-return: false
-      pool-prepared-statements: true
-      max-open-prepared-statements: 20
-      max-pool-prepared-statement-per-connection-size: 20
-      filters:
-        stat:
-          log-slow-sql: true
-          slow-sql-millis: 5000
-          merge-sql: false
-        wall:
-          config:
-            multi-statement-allow: true
-      #      connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
-      use-global-data-source-stat: true
-
-
-tofly-filter:
-  urls:
-    - /v2/api-docs
-    - /load*
-    - /getAsciiDocs**
-    - /getMarkdownDocs**
-    - /actuator/**
-
-

+ 0 - 124
src/main/resources/config/oracle/application-dev.yml

@@ -1,124 +0,0 @@
-# 加解密根密码
-jasypt:
-  encryptor:
-    password: tofly #根密码
-
-# Spring 相关
-spring:
-  redis:
-    password:
-    host: tofly-redis
-    jedis:
-      pool:
-        max-idle: 30
-        min-idle: 10
-        max-active: 20
-        max-wait: 10000
-  # zipkin
-  zipkin:
-    enabled: true
-    base-url: http://127.0.0.1:6002
-  sleuth:
-    web:
-      client:
-        enabled: true
-    sampler:
-      # 默认的采样比率为0.1,不能看到所有请求数据
-      # 更改采样比率为1,就能看到所有的请求数据了,但是这样会增加接口调用延迟
-      probability: 1.0
-  servlet:
-    multipart:
-      max-file-size: 100MB
-      max-request-size: 100MB
-  jackson:
-    date-format: yyyy-MM-dd HH:mm:ss
-    time-zone: GMT+8
-#  boot:
-#    admin:
-#      client:
-#        url: http://127.0.0.1:6001
-
-# 暴露监控端点
-management:
-  endpoints:
-    web:
-      exposure:
-        include: '*'
-
-# feign 配置
-feign:
-  hystrix:
-    enabled: true
-  okhttp:
-    enabled: true
-  httpclient:
-    enabled: false
-  client:
-    config:
-      default:
-        connectTimeout: 10000
-        readTimeout: 10000
-  compression:
-    request:
-      enabled: true
-    response:
-      enabled: true
-
-# hystrix 配置
-hystrix:
-  command:
-    default:
-      execution:
-        isolation:
-          strategy: SEMAPHORE
-          thread:
-            timeoutInMilliseconds: 60000
-  shareSecurityContext: true
-
-#请求处理的超时时间
-ribbon:
-  ReadTimeout: 10000
-  ConnectTimeout: 10000
-
-# mybaits-plus配置
-
-mybatis-plus:
-  type-aliases-package: com.tofly.*.entity,com.tofly.*.custom.entity
-  mapper-locations: classpath*:/mapper/*Mapper.xml,classpath*:/customMapper/*Mapper.xml
-  global-config:
-    banner: false
-    db-config:
-      #主键类型  0:"数据库ID自增", 1:"用户输入ID",2:"全局唯一ID (数字类型唯一ID)", 3:"全局唯一ID UUID";
-      id-type: 1
-      field-strategy: 1
-      table-underline: true
-      logic-delete-value: 0 #逻辑已删除
-      logic-not-delete-value: 1   #逻辑未删除 (加上@TableLogic后,相当于存在判断条件 column= 1 )
-      db-type: oracle
-  configuration:
-    map-underscore-to-camel-case: true
-    call-setters-on-nulls: true
-    jdbc-type-for-null: null
-    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
-
-
-  #spring security 配置
-security:
-  oauth2:
-    resource:
-      loadBalanced: true
-      token-info-uri: http://tofly-auth/oauth/check_token
-
-ftp:
-  enable: true
-  server: tofly-ftp
-  port: 8033
-  userName: ENC(tjdOntnkeceeo/aiTdGifA==)
-  password: ENC(tjdOntnkeceeo/aiTdGifA==)
-
-eureka:
-  instance:
-    leaseRenewalIntervalInSeconds: 10
-    health-check-url-path: /actuator/health
-    metadata-map:
-      startup: ${random.int}    #needed to trigger info and endpoint update after restart

+ 0 - 39
src/main/resources/config/oracle/tofly-auth-dev.yml

@@ -1,39 +0,0 @@
-security:
-  oauth2:
-    client:
-      client-id: ENC(uRVGfvAwW6FVQJm/GC7v0A==)  #tofly
-      client-secret: ENC(w5AYCtwwgd+zVwGc5AudCw==)
-      scope: server
-
-spring:
-  datasource:
-    url: jdbc:oracle:thin:@tofly-db:1521/orcl
-    driver-class-name: oracle.jdbc.OracleDriver
-    #    driver-class-name: oracle.jdbc.driver.OracleDriver
-    username: tf_dyrq_sms
-    password: tf_dyrq_sms
-    type: com.alibaba.druid.pool.DruidDataSource
-    druid:
-      initial-size: 10
-      min-idle: 1
-      max-active: 100
-      max-wait: 60000
-      time-between-eviction-runsMillis: 60000
-      min-evictable-idle-timeMillis: 300000
-      validation-query: select 1 FROM DUAL
-      test-while-idle: true
-      test-on-borrow: false
-      test-on-return: false
-      pool-prepared-statements: true
-      max-open-prepared-statements: 20
-      max-pool-prepared-statement-per-connection-size: 20
-      filters:
-        stat:
-          log-slow-sql: true
-          slow-sql-millis: 5000
-          merge-sql: false
-        wall:
-          config:
-            multi-statement-allow: true
-      #      connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
-      use-global-data-source-stat: true

+ 0 - 48
src/main/resources/config/oracle/tofly-flowable-dev.yml

@@ -1,48 +0,0 @@
-security:
-  oauth2:
-    client:
-      client-id: ENC(uRVGfvAwW6FVQJm/GC7v0A==)  #tofly
-      client-secret: ENC(w5AYCtwwgd+zVwGc5AudCw==)
-      scope: server
-
-
-
-
-# 数据源
-spring:
-  datasource:
-    url: jdbc:oracle:thin:@tofly-db:1521/orcl
-    driver-class-name: oracle.jdbc.OracleDriver
-#    driver-class-name: oracle.jdbc.driver.OracleDriver
-    username: tf_dyrq_war
-    password: tf_dyrq_war
-    type: com.alibaba.druid.pool.DruidDataSource
-    druid:
-      initial-size: 10
-      min-idle: 1
-      max-active: 100
-      max-wait: 60000
-      time-between-eviction-runsMillis: 60000
-      min-evictable-idle-timeMillis: 300000
-      validation-query: select 1 FROM DUAL
-      test-while-idle: true
-      test-on-borrow: false
-      test-on-return: false
-      pool-prepared-statements: true
-      max-open-prepared-statements: 20
-      max-pool-prepared-statement-per-connection-size: 20
-      filters:
-        stat:
-          log-slow-sql: true
-          slow-sql-millis: 5000
-          merge-sql: false
-        wall:
-          config:
-            multi-statement-allow: true
-      #      connection-properties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
-      use-global-data-source-stat: true
-
-
-
-
-

+ 0 - 61
src/main/resources/config/oracle/tofly-getway-dev.yml

@@ -1,61 +0,0 @@
-spring:
-  #拦截规则
-  cloud:
-    gateway:
-      routes:
-        - id: appdemo
-          uri: lb://appdemo
-          predicates:
-            - Path=/appdemo/**
-#          filters:
-#            - SwaggerHeaderFilter
-#          filters:
-#            - StripPrefix=1
-              # 认证中心
-        - id: tofly-auth
-          uri: lb://tofly-auth
-          predicates:
-            - Path=/auth/**
-          filters:
-            - LoginParamFilter
-              #基本信息
-        - id: tofly-base
-          uri: lb://tofly-base
-          predicates:
-            - Path=/base/**
-          #西南科大业务应用
-        - id: tofly-xnkd
-          uri: lb://tofly-xnkd
-          predicates:
-            - Path=/xnkd/**
-          #西南科大业务应用
-        - id: tofly-flowable
-          uri: lb://tofly-flowable
-          predicates:
-            - Path=/flowable/**
-          #德阳燃气业务应用
-        - id: tofly-dyrq
-          uri: lb://tofly-dyrq
-          predicates:
-            - Path=/dyrq/**
-#          filters:
-#            - SwaggerHeaderFilter
-          #用户测试
-          # 重点!info必须使用http进行转发,lb代表从注册中心获取服务
-          #uri: lb://testuser
-          #predicates:
-          #- path=/userapi/**
-          # http://localhost:8001/userapi/user/users/2, 必须加上StripPrefix=1,否则访问服务时会带上userapi
-          #而不是我们期望的去掉userapi,只保留**部分
-          #filters:
-          #- StripPrefix=1
-  #跨域
-      globalcors:
-        corsConfigurations:
-          '[/**]':
-            allowCredentials: true
-            exposedHeaders: "Content-Disposition,Content-Type,Cache-Control"
-            allowedHeaders: "*"
-            allowedOrigins: "*"
-            allowedMethods: "*"
-

+ 0 - 1
src/main/resources/config/oracle/tofly-monitor-dev.yml

@@ -1 +0,0 @@
-

+ 0 - 7
src/main/resources/config/mysql/tofly-auth-dev.yml

@@ -1,10 +1,3 @@
-security:
-  oauth2:
-    client:
-      client-id: ENC(uRVGfvAwW6FVQJm/GC7v0A==)  #tofly
-      client-secret: ENC(w5AYCtwwgd+zVwGc5AudCw==)
-      scope: server
-
 spring:
   datasource:
     url: jdbc:oracle:thin:@tofly-db:1521/orcl

+ 0 - 7
src/main/resources/config/oracle/tofly-base-dev.yml

@@ -1,10 +1,3 @@
-security:
-  oauth2:
-    client:
-      client-id: ENC(uRVGfvAwW6FVQJm/GC7v0A==)  #tofly
-      client-secret: ENC(w5AYCtwwgd+zVwGc5AudCw==)
-      scope: server
-
 # 数据源
 spring:
   datasource:

+ 0 - 10
src/main/resources/config/oracle/tofly-dyrq-dev.yml

@@ -1,13 +1,3 @@
-security:
-  oauth2:
-    client:
-      client-id: ENC(uRVGfvAwW6FVQJm/GC7v0A==)  #tofly
-      client-secret: ENC(w5AYCtwwgd+zVwGc5AudCw==)
-      scope: server
-
-
-
-
 # 数据源
 spring:
   datasource:

+ 0 - 10
src/main/resources/config/mysql/tofly-flowable-dev.yml

@@ -1,13 +1,3 @@
-security:
-  oauth2:
-    client:
-      client-id: ENC(uRVGfvAwW6FVQJm/GC7v0A==)  #tofly
-      client-secret: ENC(w5AYCtwwgd+zVwGc5AudCw==)
-      scope: server
-
-
-
-
 # 数据源
 spring:
   datasource:

src/main/resources/config/mysql/tofly-getway-dev.yml → src/main/resources/config/tofly-getway-dev.yml


src/main/resources/config/mysql/tofly-monitor-dev.yml → src/main/resources/config/tofly-monitor-dev.yml


+ 0 - 10
src/main/resources/config/oracle/tofly-xnkd-dev.yml

@@ -1,13 +1,3 @@
-security:
-  oauth2:
-    client:
-      client-id: ENC(uRVGfvAwW6FVQJm/GC7v0A==)  #tofly
-      client-secret: ENC(w5AYCtwwgd+zVwGc5AudCw==)
-      scope: server
-
-
-
-
 # 数据源
 spring:
   datasource: