社区
Web 开发
帖子详情
如何获取client的ip address
jon_bon_jovi
2003-10-16 03:40:47
在servlet中用request.getRemoteAddr()得到的是server的ip而不是client的ip
不知道怎么回事,有没有人知道
...全文
132
3
打赏
收藏
如何获取client的ip address
在servlet中用request.getRemoteAddr()得到的是server的ip而不是client的ip 不知道怎么回事,有没有人知道
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
3 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
jon_bon_jovi
2003-10-16
打赏
举报
回复
在server上做的
现在怀疑是load balance的问题,但不确定
wellsoon
2003-10-16
打赏
举报
回复
request.getRemoteAddr()得到的是 客户端的ip地址,
如果客户端是通过代理服务器发出请求,得到的ip则是代理服务器ip。
bonnyone
2003-10-16
打赏
举报
回复
你是在本机上做试验吗?
javascr
ip
t必修课_offset,
client
,scroll家族
本课将带你学习前端开发中最重要的技术JavaScr
ip
t,它是网页与用户进行交互的基石。...最后我们还会学习Jquery框架,以提高你的前端开发效率。学完本课后,你将能独立做出与用户有复杂交互(表单、动画、视频等)的网站...
@Value(“${spring.cloud.
client
.
ip
-
address
}“)
获取
ip
在sprigboot2.0之前为@Value("${spring.cloud.
client
.
ip
Address
}")在springboot2.0之后改为了@Value("${spring.cloud.
client
.
ip
-
address
}") 在springboot中使用@Value("${spring.cloud.
client
.
ip
-
address
}")
获取
ip
...
SpringCloud 配置${spring.cloud.
client
.
ip
Address
}
配置注册到Eureka的相同服务的多... 配置${spring.cloud.
client
.
ip
Address
} eureka: instance: prefer-
ip
-
address
: true instance-id: ${spring.cloud.
client
.
ip
Address
}:${spring.application.name}:${server...
Spring Cloud配置
ip
注册找不到${spring.cloud.
client
.
ip
Address
}
如果你的Eureka
client
程序中,配置${spring.cloud.
client
.
ip
Address
}不生效,则需要按以下步骤搞: 1.首先,在SpringCloud 2.x已经改成${spring.cloud.
client
.
ip
-
address
}了,所以你得首先修改 eureka: ...
{spring.cloud.
client
.
ip
Address
}
${spring.cloud.
client
.hostname}:${spring.application.name}:${spring.application.instance_id:${server.port}}, 也就是:主机名:应用名:应用端口。如图1 2.可以自定义: eureka.instance....
Web 开发
81,094
社区成员
341,717
社区内容
发帖
与我相关
我的任务
Web 开发
Java Web 开发
复制链接
扫一扫
分享
社区描述
Java Web 开发
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章