From b4f5743b08f753ba6a2e166d3cc8199e52749d8d Mon Sep 17 00:00:00 2001 From: zhizhi wu <2377881365@qq.com> Date: Tue, 17 Mar 2020 15:46:27 +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 --- admin/src/main/resources/application-prod.yml | 63 ++++++++++++++++++- admin/src/main/resources/application-test.yml | 2 +- admin/src/main/resources/application.yml | 2 +- ccmq/pom.xml | 6 ++ 4 files changed, 69 insertions(+), 4 deletions(-) diff --git a/admin/src/main/resources/application-prod.yml b/admin/src/main/resources/application-prod.yml index fe7e47c..86345b3 100644 --- a/admin/src/main/resources/application-prod.yml +++ b/admin/src/main/resources/application-prod.yml @@ -1,5 +1,64 @@ server: - port: 1000 + port: 7000 +# 使用在服务代理器之后 +# use-forward-headers: true spring: application: - name: admin \ No newline at end of file + name: admin + boot: + admin: + ui: + title: SpringBootAdmin-Server +# notify: +# mail: +# from: ${spring.mail.username} +# to: wuhuijuan@ccsens.com, zhangye@ccsens.com,weizezhao@ccsens.com + security: + user: + name: admin #配置登录的账号 + password: password #配置登录的密码 +# mail: +# host: smtp.qq.com +# username: 654600784@qq.com +# password: ryuwsxunlaxvbcbg +# properties: +# mail: +# smtp: +# auth: true +#Actuator配置:暴露敏感路径,默认情况下,敏感路径并不暴露 +management: + endpoints: + web: + exposure: + # 暴露xxx端点,如需暴露多个,用,分隔;如需暴露所有端点,用'*' +# include: "*" + # 不暴露哪些端点 + exclude: env,beans,configprops + endpoint: + health: + # 是否展示健康检查详情 + show-details: ALWAYS + health: + redis: + enabled: false + +eureka: + instance: + lease-renewal-interval-in-seconds: 10 + health-check-url-path: /actuator/health + metadata-map: + # startup: ${random.int} #needed to trigger info and endpoint update after restart + user.name: ${spring.security.user.name} + user.password: ${spring.security.user.password} + # # 是否注册IP到eureka server,如不指定或设为false,那就回注册主机名到eureka server + prefer-ip-address: true + client: + service-url: + # 指定eureka server通信地址,注意/eureka/小尾巴不能少 + # defaultZone: http://admin:admin@peer1:8761/eureka/,http://admin:admin@peer2:8762/eureka/ + defaultZone: http://admin:admin@127.0.0.1:7010/eureka/ + registry-fetch-interval-seconds: 5 +logging: + file: /home/admin/log/admin.log + pattern: + file: '%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(%5p) %clr(${PID}){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n%wEx' \ No newline at end of file diff --git a/admin/src/main/resources/application-test.yml b/admin/src/main/resources/application-test.yml index edefc76..fdcd89c 100644 --- a/admin/src/main/resources/application-test.yml +++ b/admin/src/main/resources/application-test.yml @@ -1,5 +1,5 @@ server: - port: 1000 + port: 7000 # 使用在服务代理器之后 # use-forward-headers: true spring: diff --git a/admin/src/main/resources/application.yml b/admin/src/main/resources/application.yml index caf4dfc..90385b2 100644 --- a/admin/src/main/resources/application.yml +++ b/admin/src/main/resources/application.yml @@ -1,3 +1,3 @@ spring: profiles: - active: dev \ No newline at end of file + active: prod \ No newline at end of file diff --git a/ccmq/pom.xml b/ccmq/pom.xml index 13f4206..3904a5e 100644 --- a/ccmq/pom.xml +++ b/ccmq/pom.xml @@ -236,6 +236,12 @@ org.springframework.boot spring-boot-maven-plugin + + maven-surefire-plugin + + true + + org.mybatis.generator mybatis-generator-maven-plugin