参数

@RestController
@RefreshScope
public class HomeController {

    @Value("${foo}")
    String foo;

    @RequestMapping(value = "/hi")
    public String hi(){
        return foo;
    }
}

 

请求 http://localhost:8881/refresh

Spring cloud @RefreshScope使用

 

Spring cloud @RefreshScope使用

 

相关文章:

  • 2021-12-22
  • 2022-02-01
  • 2021-07-22
  • 2021-05-16
  • 2021-12-04
  • 2022-01-23
  • 2022-12-23
  • 2022-01-08
猜你喜欢
  • 2022-12-23
  • 2021-10-20
  • 2022-12-23
  • 2022-12-23
  • 2022-02-16
  • 2021-10-18
相关资源
相似解决方案