diff --git a/pro.yaml b/pro.yaml index 46a432f..e46f9f9 100644 --- a/pro.yaml +++ b/pro.yaml @@ -84,7 +84,7 @@ metadata: labels: app: biz-service-ebtp-extend-svc # [12] service的标签,可与参数[11]相同 annotations: - lb.cke.tg.unicom/target-vports: 18018-18018 #[13] 内部端口-外部端口映射 内部端口为server.port,即与参数[4]相同 +# lb.cke.tg.unicom/target-vports: 18018-18018 #[13] 内部端口-外部端口映射 内部端口为server.port,即与参数[4]相同 prometheus.io/port: '18018' #[13] prometheus自动发现service的端口,也是该微服务所使用的端口,与参数[4]相同 prometheus.io/test-svc: 'true' #[14] 开启prometheus自动发现service的功能,自动发现所带标签为test-svc的service spec: diff --git a/src/main/resources/application-pro.yml b/src/main/resources/application-pro.yml new file mode 100644 index 0000000..9b13b0e --- /dev/null +++ b/src/main/resources/application-pro.yml @@ -0,0 +1,168 @@ +server: + port: 18018 + servlet: + context-path: / + +seata: + service: + vgroup-mapping: + biz-service-ebtp-extend-service-group: default + + #registry: + # type: eureka + # eureka: + # serviceUrl: http://10.242.31.158:5001/eureka,http://10.242.31.158:5002/eureka,http://10.242.31.158:5003/eureka + +# 对应 apollo 配置中心的应用名 +app: + id: biz-service-ebtp-extend + +# Apollo 配置信息 +apollo: + meta: http://10.238.25.112:6001/ + bootstrap: + namespace: application + enabled: true + eagerLoad: + enabled: true + +spring: + aop: + auto: true #开启spring的aop配置 + proxy-target-class: true + + application: + name: biz-service-ebtp-extend + + shardingsphere: + datasource: + names: ds0 + ds0: + type: com.alibaba.druid.pool.DruidDataSource + driver-class-name: com.mysql.cj.jdbc.Driver + username: auction + password: root + jdbc-url: jdbc:mysql://10.168.9.242:3306/ebtp_mall_extend?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true + url: jdbc:mysql://10.168.9.242:3306/ebtp_mall_extend?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true + filters: stat,wall,log4j + maxActive: 20 + initialSize: 1 + maxWait: 60000 + minIdle: 1 + timeBetweenEvictionRunsMillis: 60000 + minEvictableIdleTimeMillis: 300000 + validationQuery: select 'x' + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + poolPreparedStatements: true + maxOpenPreparedStatements: 20 + connection-properties: druid.stat.merggSql=ture;druid.stat.slowSqlMillis=5000 + props: + sql: + show: true + + jackson: + date-format: yyyy-MM-dd HH:mm:ss + time-zone: GMT+8 + serialization: + write-dates-as-timestamps: false + + # 天宫Kafka增加了安全认证,需要配置安全属性 + kafka: + bootstrap-servers: 10.172.48.110:32050,10.172.48.109:32050,10.172.48.111:32050 + template: + default-topic: jl_test + + # 生产者配置参数 + producer: + client-id: core-service-ebtp-crypt + properties: + security.protocol: SASL_PLAINTEXT + sasl.mechanism: SCRAM-SHA-256 + sasl.jaas.config: org.apache.kafka.common.security.scram.ScramLoginModule required username="eshop-kafka" password="Unicom#135"; + + # 消费者配置参数 + consumer: + group-id: core-service-ebtp-crypt-consumer + auto-offset-reset: latest + properties: + security.protocol: SASL_PLAINTEXT + sasl.mechanism: SCRAM-SHA-256 + sasl.jaas.config: org.apache.kafka.common.security.scram.ScramLoginModule required username="eshop-kafka" password="Unicom#135"; + + # 生产区 redis 配置 + redis: + sentinel: + master: eshop-redis + nodes: 10.172.48.83:32521,10.172.48.100:32521,10.172.48.94:32561 + password: Unicom#135 + +# 天宫Eureka配置 +eureka: + client: + service-url: + defaultZone: http://eureka-1-svc:8080/eureka,http://eureka-2-svc:8080/eureka,http://eureka-3-svc:8080/eureka + instance: + prefer-ip-address: true + instance-id: http://10.238.25.112:${server.port} + # 这是客户端的注册地址, eureka 会通过这个地址建立管道 + ip-address: 10.238.25.112 + +mybatis-plus: + configuration: + # 是否开启自动驼峰命名规则映射:从数据库列名到Java属性驼峰命名的类似映射 + map-underscore-to-camel-case: true + auto-mapping-behavior: full + # 这个配置会将执行的sql打印出来,在开发或测试的时候可以用 + log-impl: org.apache.ibatis.logging.stdout.StdOutImpl + mapper-locations: classpath*:com/chinaunicom/mall/ebtp/**/mapper/*Mapper.xml + global-config: + # 逻辑删除配置 + db-config: + # logic-delete-field: flag # 全局逻辑删除的实体字段名(since 3.3.0,配置后可以忽略不配置步骤2) @TableLogic + logic-delete-value: deleted # 逻辑已删除值 + logic-not-delete-value: normal # 逻辑未删除值 + +hystrix: + command: + default: + execution: + timeout: + enabled: true + isolation: + strategy: SEMAPHORE + thread: + timeoutInMilliseconds: 200000 #熔断超时时间 + circuitBreaker: + sleepWindowInMilliseconds: 20000 + forceClosed: true + +ribbon: + ReadTimeout: 20000 #请求处理的超时时间 + ConnectTimeout: 20000 #请求连接超时时间 + MaxAutoRetries: 0 #对当前实例的重试次数 + MaxAutoRetriesNextServer: 1 #切换实例的重试次数 1 + +mconfig: + workerId: 1 + datacenterId: 1 + # 服务名 + feign: + name: + open: biz-service-ebtp-opening #开标大厅服务 + process: biz-service-ebtp-process #评审流程服务 + project: biz-service-ebtp-project #项目服务 + resps: biz-service-ebtp-resps #应答结构化服务 + rsms: biz-service-ebtp-rsms #评审结构化服务 + tender: biz-service-ebtp-tender #投标服务 + +# 用户暴露给 prometheus 的健康数据 +management: + endpoints: + web: + exposure: + include: "*" + cors: + allowed-origins: "*" + allowed-methods: "*" diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index f2b90d5..fc3033b 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -1,3 +1,3 @@ spring: profiles: - active: uat \ No newline at end of file + active: pro \ No newline at end of file