optimize config demo (#580)

pull/586/head
lepdou 2 years ago committed by GitHub
parent 9ea84328f1
commit 8eec5cc58c
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}")

@ -14,7 +14,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