diff --git a/hippo4j-example/hippo4j-core-nacos-spring-boot-starter-example/src/main/resources/bootstrap.properties b/hippo4j-example/hippo4j-core-nacos-spring-boot-starter-example/src/main/resources/bootstrap.properties new file mode 100644 index 00000000..652b3dcf --- /dev/null +++ b/hippo4j-example/hippo4j-core-nacos-spring-boot-starter-example/src/main/resources/bootstrap.properties @@ -0,0 +1,50 @@ +server.port=8089 +server.servlet.context-path=/example + +management.metrics.export.prometheus.enabled=true +management.server.port=29999 +management.endpoints.web.exposure.include=* + +spring.profiles.active=dev +spring.application.name=dynamic-threadpool-example + +spring.cloud.nacos.config.password=nacos +spring.cloud.nacos.config.server-addr=127.0.0.1:8848 +spring.cloud.nacos.config.username=nacos +spring.cloud.nacos.config.extension-configs[0].data-id=hippo4j-nacos.yaml +spring.cloud.nacos.config.extension-configs[0].group=DEFAULT_GROUP +spring.cloud.nacos.config.extension-configs[0].refresh=true + +spring.dynamic.thread-pool.enable=true +spring.dynamic.thread-pool.banner=true +spring.dynamic.thread-pool.collect=true +spring.dynamic.thread-pool.check-state-interval=5 + +spring.dynamic.thread-pool.notify-platforms[0].platform=WECHAT +spring.dynamic.thread-pool.notify-platforms[0].secret-key=ac0426a5-c712-474c-9bff-72b8b8f5caff +spring.dynamic.thread-pool.notify-platforms[1].platform=DING +spring.dynamic.thread-pool.notify-platforms[1].secret-key=56417ebba6a27ca352f0de77a2ae9da66d01f39610b5ee8a6033c60ef9071c55 +spring.dynamic.thread-pool.notify-platforms[2].platform=LARK +spring.dynamic.thread-pool.notify-platforms[2].secret-key=2cbf2808-3839-4c26-a04d-fd201dd51f9e + +spring.dynamic.thread-pool.nacos.data-id=hippo4j-nacos.yaml +spring.dynamic.thread-pool.nacos.group=DEFAULT_GROUP +spring.dynamic.thread-pool.config-file-type=yml + +spring.dynamic.thread-pool.executors[0].thread-pool-id=message-consume +spring.dynamic.thread-pool.executors[0].core-pool-size=1 +spring.dynamic.thread-pool.executors[0].maximum-pool-size=1 +spring.dynamic.thread-pool.executors[0].queue-capacity=1 +spring.dynamic.thread-pool.executors[0].blocking-queue=LinkedBlockingQueue +spring.dynamic.thread-pool.executors[0].execute-time-out=1000 +spring.dynamic.thread-pool.executors[0].rejected-handler=AbortPolicy +spring.dynamic.thread-pool.executors[0].keep-alive-time=6691 +spring.dynamic.thread-pool.executors[0].allow-core-thread-time-out=true +spring.dynamic.thread-pool.executors[0].thread-name-prefix=message-consume +spring.dynamic.thread-pool.executors[0].notify.is-alarm=true +spring.dynamic.thread-pool.executors[0].notify.active-alarm=80 +spring.dynamic.thread-pool.executors[0].notify.capacity-alarm=80 +spring.dynamic.thread-pool.executors[0].notify.interval=8 +spring.dynamic.thread-pool.executors[0].notify.receives.WECHAT=xxx +spring.dynamic.thread-pool.executors[0].notify.receives.DING=xxx +spring.dynamic.thread-pool.executors[0].notify.receives.LARK=xxx diff --git a/hippo4j-example/hippo4j-core-nacos-spring-boot-starter-example/src/main/resources/bootstrap.yaml b/hippo4j-example/hippo4j-core-nacos-spring-boot-starter-example/src/main/resources/bootstrap.yaml deleted file mode 100644 index 70a0a9ad..00000000 --- a/hippo4j-example/hippo4j-core-nacos-spring-boot-starter-example/src/main/resources/bootstrap.yaml +++ /dev/null @@ -1,72 +0,0 @@ -server: - port: 8089 - servlet: - context-path: /example - -management: - metrics: - export: - prometheus: - enabled: true - server: - port: 29999 - endpoints: - web: - exposure: - include: '*' - -spring: - profiles: - active: dev - - application: - name: dynamic-threadpool-example - - cloud: - nacos: - config: - password: nacos - server-addr: 127.0.0.1:8848 - username: nacos - extension-configs: - - data-id: hippo4j-nacos.yaml - group: DEFAULT_GROUP - refresh: true - - dynamic: - thread-pool: - enable: true - banner: true - collect: true - check-state-interval: 5 - notify-platforms: - - platform: 'WECHAT' - secret-key: ac0426a5-c712-474c-9bff-72b8b8f5caff - - platform: 'DING' - secret-key: 56417ebba6a27ca352f0de77a2ae9da66d01f39610b5ee8a6033c60ef9071c55 - - platform: 'LARK' - secret-key: 2cbf2808-3839-4c26-a04d-fd201dd51f9e - nacos: - data-id: 'hippo4j-nacos.yaml' - group: 'DEFAULT_GROUP' - config-file-type: yml - executors: - - thread-pool-id: 'message-consume' - core-pool-size: 1 - maximum-pool-size: 1 - queue-capacity: 1 - blocking-queue: 'LinkedBlockingQueue' - execute-time-out: 1000 - rejected-handler: 'AbortPolicy' - keep-alive-time: 6691 - allow-core-thread-time-out: true - thread-name-prefix: 'message-consume' - notify: - is-alarm: true - active-alarm: 80 - capacity-alarm: 80 - interval: 8 - receives: - WECHAT: 'xxx' # Fill in the enterprise weChat userId - DING: 'xxx' # phone - LARK: 'xxx'