Make Spring Boot application discoverable with zeroconf
Asked Answered
D

0

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.

Doubling answered 16/7, 2016 at 10:51 Comment(3)
Have you found a solution?Breena
Unfortunately no.Doubling
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.Doubling

© 2022 - 2024 — McMap. All rights reserved.