|
@@ -12,6 +12,7 @@ import io.swagger.annotations.*;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
@@ -78,7 +79,13 @@ public class ExamInfoController extends BaseController{
|
|
|
return Response.success(examInfoService.getCity(proviceId));
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ @GetMapping(value = "/ip")
|
|
|
+ @ApiOperation("获取访问IP")
|
|
|
+ public Response<String> exampleMethod(HttpServletRequest request) {
|
|
|
+ String ipAddress = request.getRemoteAddr();
|
|
|
+ System.out.println("IP address of the user: " + ipAddress);
|
|
|
+ return Response.success(ipAddress);
|
|
|
+ }
|
|
|
|
|
|
|
|
|
}
|