From 496d58227dcdda32b76cd4f5558ebb1aab70e718 Mon Sep 17 00:00:00 2001 From: zhizhi wu <2377881365@qq.com> Date: Tue, 17 Mar 2020 15:45:29 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=9F=E4=BA=A7=E7=8E=AF=E5=A2=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/application-util-prod.yml | 60 +++++++++++++++++++ ht/src/main/resources/application-prod.yml | 40 +++++++++++++ tall/src/main/resources/application-prod.yml | 32 ++++++++++ .../test/java/com/ccsens/util/TestQrCord.java | 4 +- 4 files changed, 134 insertions(+), 2 deletions(-) create mode 100644 cloudutil/src/main/resources/application-util-prod.yml create mode 100644 ht/src/main/resources/application-prod.yml create mode 100644 tall/src/main/resources/application-prod.yml diff --git a/cloudutil/src/main/resources/application-util-prod.yml b/cloudutil/src/main/resources/application-util-prod.yml new file mode 100644 index 00000000..88c7e267 --- /dev/null +++ b/cloudutil/src/main/resources/application-util-prod.yml @@ -0,0 +1,60 @@ +#服务端点暴露 +management: + endpoints: + web: + exposure: + # 暴露xxx端点,如需暴露多个,用,分隔;如需暴露所有端点,用'*' + include: auditevents,caches,conditions,flyway,health,heapdump,httptrace,info,integrationgraph,jolokia,logfile,loggers,liquibase,metrics,mappings,prometheus,scheduledtasks,sessions,shutdown,threaddump,hystrix.stream +# # 不暴露哪些端点 + exclude: env,beans,configprops + endpoint: + health: + # 是否展示健康检查详情 + show-details: always + health: + redis: + enabled: false +#eureka注册 +eureka: + client: + service-url: + # 指定eureka server通信地址,注意/eureka/小尾巴不能少 + #defaultZone: http://admin:admin@peer1:8761/eureka/,http://admin:admin@peer2:8762/eureka/ + defaultZone: http://admin:admin@140.143.228.3:7010/eureka/ + instance: + # 是否注册IP到eureka server,如不指定或设为false,那就回注册主机名到eureka server + prefer-ip-address: true + metadata-map: + management: + context-path: ${server.servlet.context-path:}/actuator + home-page-url-path: ${server.servlet.context-path:}/ + status-page-url-path: ${server.servlet.context-path:}/actuator/info + health-check-url-path: ${server.servlet.context-path:}/actuator/health +feign: + client: + config: + default: + connectTime: 5000 + readTimeout: 5000 + # NONE【性能最佳,适用于生产】:不记录任何日志(默认值)。 + # BASIC【适用于生产环境追踪问题】:仅记录请求方法、URL、响应状态代码以及执行时间。 + # HEADERS:记录BASIC级别的基础上,记录请求和响应的header。 + # FULL【比较适用于开发及测试环境定位问题】:记录请求和响应的header、body和元数据 + loggerLevel: basic + hystrix: + enabled: true +# sleuth +logging: + level: + root: info + org.springframework.cloud.sleuth: DEBUG +spring: +# zipkin: +# base-url: http://140.143.228.3:9411 +# sleuth: +# sampler: +# # 采样率,模式0.1,也就是10%,为了便于观察效果,改为1.0,也就是100%。生产环境建议保持默认。 +# probability: 0.1 + cloud: + inetutils: + ignored-interfaces: ['VMware.*'] \ No newline at end of file diff --git a/ht/src/main/resources/application-prod.yml b/ht/src/main/resources/application-prod.yml new file mode 100644 index 00000000..c6ff8967 --- /dev/null +++ b/ht/src/main/resources/application-prod.yml @@ -0,0 +1,40 @@ +server: + port: 7040 + servlet: + context-path: +spring: + application: + name: ht + datasource: + type: com.alibaba.druid.pool.DruidDataSource + rabbitmq: + host: api.ccsens.com + password: 111111 + port: 5672 + username: admin + redis: + database: 0 + host: 127.0.0.1 + jedis: + pool: + max-active: 200 + max-idle: 10 + max-wait: -1ms + min-idle: 0 + password: '' + port: 6379 + timeout: 1000ms + + +swagger: + enable: false +file: + path: /home/cloud/ht/uploads/ + domain: https://www.tall.wiki/gateway/ht/ + imgDomain: https://www.tall.wiki/gateway/ht/uploads +ht: + project: + name: 认知功能评测云平台系统 +eureka: + instance: + ip-address: 140.143.228.3 \ No newline at end of file diff --git a/tall/src/main/resources/application-prod.yml b/tall/src/main/resources/application-prod.yml new file mode 100644 index 00000000..709832ea --- /dev/null +++ b/tall/src/main/resources/application-prod.yml @@ -0,0 +1,32 @@ +server: + port: 7030 + servlet: + context-path: /v1.0 +spring: + application: + name: tall + datasource: + type: com.alibaba.druid.pool.DruidDataSource + rabbitmq: + host: api.ccsens.com + password: 111111 + port: 5672 + username: admin + redis: + database: 0 + host: 127.0.0.1 + jedis: + pool: + max-active: 200 + max-idle: 10 + max-wait: -1ms + min-idle: 0 + password: '' + port: 6379 + timeout: 1000ms +swagger: + enable: false +eureka: + instance: + ip-address: 140.143.228.3 +gatewayUrl: https://www.tall.wiki/gateway/ \ No newline at end of file diff --git a/util/src/test/java/com/ccsens/util/TestQrCord.java b/util/src/test/java/com/ccsens/util/TestQrCord.java index b0953594..19cd8fcc 100644 --- a/util/src/test/java/com/ccsens/util/TestQrCord.java +++ b/util/src/test/java/com/ccsens/util/TestQrCord.java @@ -16,7 +16,7 @@ public class TestQrCord { * * @throws Exception */ - @Test +// @Test public void test01() throws Exception { String fileName = "zzz/" + DateUtil.today() + "/" + System.currentTimeMillis() + ".png"; ByteArrayOutputStream stream = QRCode.from("112233").to(ImageType.BMP).withSize(1000, 1000).stream(); @@ -42,7 +42,7 @@ public class TestQrCord { * * @throws Exception */ - @Test +// @Test public void test02() throws Exception { // ZipUtil.gzip(new File("F:\\home\\cloud\\tall\\uploads\\zzz")); ZipUtil.zip("F:\\home\\cloud\\tall\\uploads\\zzz", "F:\\home\\cloud\\tall\\uploads\\zzz.zip");