refactor(all): 优化配置文件,增加一个随机端口的配置

同一个配置文件里用横线分割的写法实际不生效
This commit is contained in:
2023-05-01 16:53:10 +08:00
parent 243e162917
commit a358734929
12 changed files with 33 additions and 54 deletions

View File

@@ -0,0 +1,3 @@
spring:
main:
banner-mode: off

View File

@@ -0,0 +1,8 @@
eureka:
instance:
hostname: localhost
prefer-ip-address: true
instance-id: ${spring.application.name}-${eureka.instance.hostname}-${random.uuid}-${datetime}
client:
service-url:
defaultZone: http://localhost:35670/eureka/

View File

@@ -0,0 +1,12 @@
management:
endpoints:
web:
exposure:
include: "*"
endpoint:
prometheus:
enabled: true
metrics:
export:
jmx:
enabled: false

View File

@@ -0,0 +1,2 @@
server:
port: 0

View File

@@ -1,42 +0,0 @@
spring:
config:
activate:
on-profile: common
main:
banner-mode: off
server:
port: 0
---
spring:
config:
activate:
on-profile: eureka
eureka:
instance:
hostname: localhost
prefer-ip-address: true
instance-id: ${spring.application.name}-${eureka.instance.hostname}-${random.uuid}-${datetime}
client:
service-url:
defaultZone: http://localhost:35670/eureka/
---
spring:
config:
activate:
on-profile: metrics
management:
endpoints:
web:
exposure:
include: "*"
endpoint:
prometheus:
enabled: true
metrics:
export:
jmx:
enabled: false