Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在客户端使用 GWT 连接到应用程序服务器,并想知道是否有任何唯一的硬件标识符可访问(通过 GWT 或 servlet),以便我可以允许某些机器访问我的内容,并拒绝其他机器。
您将无法使用 GWT 从您的客户端获取任何硬件信息(如 MAC 地址)。
使用getThreadLocalRequest().getRemoteAddr();您将能够获得 IP 地址,如果您知道他们并且他们不更改它可能是一个解决方案
getThreadLocalRequest().getRemoteAddr();