7

How can I make a Java web app application built with Spring Boot discoverable with zeroconf?

I tried the following with JmDNS but it does not seem to work:

@Bean
public JmDNS jmdns() {
    try {
        JmDNS jmdns = JmDNS.create(InetAddress.getLocalHost());
        ServiceInfo serviceInfo = ServiceInfo.create("_http._tcp.local.", "appName", port, "path=index.html");
        jmdns.registerService(serviceInfo);
        return jmdns;
    } catch (final Exception e) {
        logger.error(e.getMessage());
        return null;
    }
}

After this I expected to be able to see the service in the Windows 10 network overview, but it does not appear there.

Edit

The application is listed in the avahi browser, which shows it somehow works.

But my goal is to have it visible in the Windows network service overview.

3
  • Have you found a solution?
    – 阿尔曼
    Commented Jun 20, 2018 at 3:13
  • Unfortunately no.
    – yglodt
    Commented Jun 20, 2018 at 3:50
  • I just wonder if maybe InetAddress.getLocalHost() is the problem? I should try with the non-localhost address. Unfortunately I have no way to test with that project now.
    – yglodt
    Commented Jun 20, 2018 at 3:52

0