HelloController.java 466 B

1234567891011121314151617181920
  1. package com.dzdy.springcloudconfigclient;
  2. import org.springframework.beans.factory.annotation.Value;
  3. import org.springframework.web.bind.annotation.RequestMapping;
  4. import org.springframework.web.bind.annotation.RestController;
  5. /**
  6. * @author wangzhiyong
  7. * @date 2018/3/6
  8. */
  9. @RestController
  10. class HelloController {
  11. @Value("${hello.hello}")
  12. private String hello;
  13. @RequestMapping("/hello")
  14. public String from() {
  15. return this.hello;
  16. }
  17. }