codecentric / codecentric/spring-boot-admin

Support of spring InetUtils in DefaultApplicationFactory

Open
#1,323 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: ideal-for-contribution theme: client type: enhancement
Dominant language
Java
Stars
12.9k
Forks
3.1k
Avg merge
19h 1m
Merged PRs (30d)
61

Description

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);
    }
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at DefaultApplicationFactory.getLocalHost() and review how the current InetAddress lookup is performed. Check how spring-cloud InetUtils can be integrated to honor the spring.cloud.inetutils configurations while retaining the existing fallback and UnknownHostException handling. Done means preferred network interfaces are selected through InetUtils when available.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
backend, networking
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.