package io.renren.modules.sys.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import io.renren.common.client.TestFeignClient;

@RestController
@RequestMapping("/adminTest")
@RefreshScope
public class TestController {
	@Autowired
	TestFeignClient testFeignClient;
	
	@Value("${hn.yz.da:sx}")
    private String addr;
	
    @RequestMapping("/addr")
    public String addr() {
        return addr;
    }
    
	@GetMapping("/name")
	public String getName(@RequestParam("name") String name) {
		return testFeignClient.getName(name);
	}
}
