From 3de6921d31be35372e361ade91bc32cfb5246407 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E7=A7=B0?= Date: Sat, 13 May 2023 23:36:19 +0800 Subject: [PATCH] Optimize the Apollo sample program (#1265) * Optimize the Apollo sample program * Optimize the Apollo sample program --- .../config/config-apollo-spring-boot-1x/pom.xml | 12 ++++++++++++ .../src/main/resources/apollo-config.properties | 1 - .../src/main/resources/bootstrap.properties | 3 +++ .../src/main/resources/apollo-config.properties | 1 - .../src/main/resources/bootstrap.properties | 3 +++ 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/examples/threadpool-example/config/config-apollo-spring-boot-1x/pom.xml b/examples/threadpool-example/config/config-apollo-spring-boot-1x/pom.xml index 84480872..ba45ae88 100644 --- a/examples/threadpool-example/config/config-apollo-spring-boot-1x/pom.xml +++ b/examples/threadpool-example/config/config-apollo-spring-boot-1x/pom.xml @@ -78,6 +78,18 @@ + + + + org.springframework.boot + spring-boot-dependencies + ${spring-boot.version} + pom + import + + + + ${project.artifactId} diff --git a/examples/threadpool-example/config/config-apollo-spring-boot-1x/src/main/resources/apollo-config.properties b/examples/threadpool-example/config/config-apollo-spring-boot-1x/src/main/resources/apollo-config.properties index 53274824..2edf88f4 100644 --- a/examples/threadpool-example/config/config-apollo-spring-boot-1x/src/main/resources/apollo-config.properties +++ b/examples/threadpool-example/config/config-apollo-spring-boot-1x/src/main/resources/apollo-config.properties @@ -1,4 +1,3 @@ -# 将以下内容复制到 Apollo 配置文件 # Copy the following to the apollo configuration file spring.dynamic.thread-pool.web.core-pool-size=64 diff --git a/examples/threadpool-example/config/config-apollo-spring-boot-1x/src/main/resources/bootstrap.properties b/examples/threadpool-example/config/config-apollo-spring-boot-1x/src/main/resources/bootstrap.properties index 432285fa..59d303c4 100644 --- a/examples/threadpool-example/config/config-apollo-spring-boot-1x/src/main/resources/bootstrap.properties +++ b/examples/threadpool-example/config/config-apollo-spring-boot-1x/src/main/resources/bootstrap.properties @@ -7,6 +7,9 @@ apollo.autoUpdateInjectedSpringProperties=true apollo.bootstrap.enabled=true apollo.bootstrap.namespaces=application apollo.bootstrap.eagerLoad.enabled=true +# If you have problems starting, add VM parameters: -Denv=dev -Dapollo.configService=http://127.0.0.1:8080 +env=dev +apollo.configService=http://127.0.0.1:8080 spring.profiles.active=dev spring.application.name=hippo4j-config-apollo-spring-boot-1x-starter-example diff --git a/examples/threadpool-example/config/config-apollo/src/main/resources/apollo-config.properties b/examples/threadpool-example/config/config-apollo/src/main/resources/apollo-config.properties index 5cdf82ce..2156078e 100644 --- a/examples/threadpool-example/config/config-apollo/src/main/resources/apollo-config.properties +++ b/examples/threadpool-example/config/config-apollo/src/main/resources/apollo-config.properties @@ -1,4 +1,3 @@ -# \u4EE5\u4E0B\u5185\u5BB9\u590D\u5236\u5230 apollo \u914D\u7F6E\u6587\u4EF6\u4E2D # Copy the following to the apollo configuration file spring.dynamic.thread-pool.web.core-pool-size=64 diff --git a/examples/threadpool-example/config/config-apollo/src/main/resources/bootstrap.properties b/examples/threadpool-example/config/config-apollo/src/main/resources/bootstrap.properties index 126a0c29..933209fd 100644 --- a/examples/threadpool-example/config/config-apollo/src/main/resources/bootstrap.properties +++ b/examples/threadpool-example/config/config-apollo/src/main/resources/bootstrap.properties @@ -7,6 +7,9 @@ apollo.autoUpdateInjectedSpringProperties=true apollo.bootstrap.enabled=true apollo.bootstrap.namespaces=application apollo.bootstrap.eagerLoad.enabled=true +# The following parameters are used for testing +env=dev +apollo.configService=http://127.0.0.1:8080 spring.profiles.active=dev spring.application.name=hippo4j-config-apollo-spring-boot-starter-example