@RequestMapping("/ppp") public InetAddress fingIp() throws Exception { return NetworkUtil.getLocalHostLANAddress(); }
$.ajax({ url: "/fras/linip",//请求地址 type: "post",//请求方式 async: false,//是否异步请求 dataType: "text", ///这里只能是text,而非json success: function (jdata1) { alert(jdata1); console.log(jdata1); $("#ip").val(jdata1); } });