|
@@ -3,6 +3,7 @@ package cn.rankin.apiweb.controller;
|
|
|
import cn.rankin.apiweb.service.ProductService;
|
|
|
import cn.rankin.common.utils.service.RedisService;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
@@ -10,6 +11,9 @@ import org.springframework.web.bind.annotation.RestController;
|
|
|
@RestController
|
|
|
public class TestFeignClient {
|
|
|
|
|
|
+ @Value("${current.test.name}")
|
|
|
+ private String name;
|
|
|
+
|
|
|
@Autowired
|
|
|
ProductService productClient;
|
|
|
|
|
@@ -18,7 +22,7 @@ public class TestFeignClient {
|
|
|
|
|
|
@RequestMapping(value = "/hello", method = RequestMethod.GET)
|
|
|
public String test() {
|
|
|
- return "hello";
|
|
|
+ return "current profile: " + name;
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "/redis", method = RequestMethod.GET)
|