From 5f3a2e98c54ce815f270d149872b2b3d0d008ff0 Mon Sep 17 00:00:00 2001 From: 懒羊羊 <15939171744@163.com> Date: 星期六, 13 一月 2024 16:17:54 +0800 Subject: [PATCH] 接口websocket --- jcdm-main/src/main/java/com/jcdm/main/sc/stationConf/controller/ScStationConfController.java | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/jcdm-main/src/main/java/com/jcdm/main/sc/stationConf/controller/ScStationConfController.java b/jcdm-main/src/main/java/com/jcdm/main/sc/stationConf/controller/ScStationConfController.java index b30d012..5b5f8b7 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/sc/stationConf/controller/ScStationConfController.java +++ b/jcdm-main/src/main/java/com/jcdm/main/sc/stationConf/controller/ScStationConfController.java @@ -1,7 +1,10 @@ package com.jcdm.main.sc.stationConf.controller; import java.util.List; +import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; + +import com.jcdm.main.util.IpInfoUtils; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -106,9 +109,10 @@ * 鑾峰彇宸ヤ綅缁堢閰嶇疆璇︾粏淇℃伅 */ @GetMapping(value = "/getIpv4") - public AjaxResult getIpv4() + public AjaxResult getIpv4(HttpServletRequest request) { - return success(scStationConfService.getIpv4()); + + return success(IpInfoUtils.getIpAddr(request)); } } -- Gitblit v1.9.3