从配置文件中读取参数
This commit is contained in:
parent
84011c846b
commit
780a72e75f
|
@ -0,0 +1,25 @@
|
|||
package com.lxg.springboot.controller;
|
||||
|
||||
import com.lxg.springboot.http.HttpAPIService;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* Created by lxg
|
||||
* on 2017/2/6.
|
||||
*/
|
||||
@RestController
|
||||
public class HttpClientController {
|
||||
|
||||
@Resource
|
||||
private HttpAPIService httpAPIService;
|
||||
|
||||
@RequestMapping("httpclient")
|
||||
public String test() throws Exception {
|
||||
String str = httpAPIService.doGet("http://www.baidu.com");
|
||||
System.out.println(str);
|
||||
return "hello";
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue