optimize config demo (#582)

pull/585/head
lepdou 2 years ago committed by GitHub
parent 2439086bd6
commit 302935b70d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -18,7 +18,6 @@ package com.tencent.cloud.polaris.config.example;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@ -29,7 +28,6 @@ import org.springframework.web.bind.annotation.RestController;
* @author lepdou 2022-03-10 * @author lepdou 2022-03-10
*/ */
@RestController @RestController
@RefreshScope
public class ConfigController { public class ConfigController {
@Value("${timeout:1000}") @Value("${timeout:1000}")

@ -12,7 +12,6 @@ spring:
groups: groups:
- name: ${spring.application.name} # group name - name: ${spring.application.name} # group name
files: [ "config/application.properties", "config/bootstrap.yml" ] # config/application.properties takes precedence over config/bootstrap.yml files: [ "config/application.properties", "config/bootstrap.yml" ] # config/application.properties takes precedence over config/bootstrap.yml
refresh-type: refresh_context
management: management:
endpoints: endpoints:
web: web:

Loading…
Cancel
Save