Announcement Announcement Module
Collapse
No announcement yet.
Get IP address for local machine Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Get IP address for local machine

    Hi,

    how can I get with "Spring" the machine-IP where a spring-application is installed?

    Thanks,
    Julio

  • #2
    java.net.InetAddress.getLocalHost() might be what you need. Nothing to do with Spring.

    Comment


    • #3
      And if you want to inject this value into some bean, you can always use the MethodInvokingFactoryBean to call the method. See the documentation for more information.

      Comment

      Working...
      X