Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support of spring InetUtils in DefaultApplicationFactory #1323

Open
yandersonlmi opened this issue Dec 6, 2019 · 3 comments
Open

Support of spring InetUtils in DefaultApplicationFactory #1323

yandersonlmi opened this issue Dec 6, 2019 · 3 comments

Comments

@yandersonlmi
Copy link

yandersonlmi commented Dec 6, 2019

To be able to select one of the "preferred" network interface which InetAddress doesn't allow.

Add the support of spring InetUtils to levrage the
"spring.cloud.inetutils.[...]" configurations in DefaultApplicationFactory.getLocalHost()

private final Optional<org.springframework.cloud.commons.util.InetUtils> inetUtils

protected InetAddress getLocalHost() {
  try {
    inetUtils.map(InetUtils::findFirstNonLoopbackAddress).orElse(InetAddress.getLocalHost());
    }
    catch (final UnknownHostException ex) {
      throw new IllegalArgumentException(ex.getMessage(), ex);
    }
}
@joshiste
Copy link
Collaborator

joshiste commented Dec 6, 2019

The spring-boot-admin-client also needs to support clients that do not use spring cloud. So we can't just make this change.

What would be possible to add a special ApplicationFactory that will be autoconfigured when the InetUtils are present.

Do you want to work on a PR for that?

@yandersonlmi
Copy link
Author

Sure, will do

@ppalanisami
Copy link

Hi, I am a new Open Source Contributor. I see this issue is for new guys. Can I take and work on this? If yes, please provide some insights.

Thanks for your cooperation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants