Skip to content

Commit

Permalink
增加了 根据通过httpclint方式根据ip获取环境功能
Browse files Browse the repository at this point in the history
  • Loading branch information
licc168 committed Jan 5, 2018
1 parent f9688cb commit 571ee1c
Showing 1 changed file with 31 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package com.licc.dove.config.controller;

import com.licc.dove.config.service.ApiService;
import java.io.IOException;
import javax.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
* 服务端对完API
* @author lichangchao
* @version 1.0.0
* @date 2018/1/4 13:43
* @see
*/
@Controller
@RequestMapping(value = "api")
public class ApiController {
@Resource
ApiService apiService;

@RequestMapping(value = "/getProfileByIp", method = RequestMethod.GET)
@ResponseBody
public String getProfileByIp(@RequestParam String ip) throws IOException {
String profile = apiService.getProfileByIp(ip);
return profile;
}
}

0 comments on commit 571ee1c

Please sign in to comment.