Get the IP address of the user’s web browser via Java on the server-side in a Vaadin 14 app
问题 In Vaadin Flow, such as version 14.1, how can I get the IP address of the user’s web browser through a Java call on the server-side? Like the Question, Get user’s IP address, and other client-side info in Vaadin 7 web app, but for Vaadin Flow instead of Vaadin 7 & 8. 回答1: WebBrowser::getAddress In Vaadin Flow, use the class WebBrowser::getAddress to get the user's IP address. To get a WebBrowser object, ask the current VaadinSession object. String ipAddress = VaadinSession.getCurrent()