Skip to content

Config not loaded properly when instantiating InetUtils in HostInfoEnvironmentPostProcessor #1233

@CC007

Description

@CC007

When org.springframework.cloud.client.HostInfoEnvironmentPostProcessor (on line 60) is trying to use the config from spring.cloud.inetutils for the instantiation of org.springframework.cloud.commons.util.InetUtils, the config isn't loaded correctly.

InetUtils in org.springframework.cloud.commons.util.UtilAutoConfiguration doesn't seem to have the same issue, because that one seems to get fully initialized before use.

This leads to a significant startup delay, because I'm using a vEthernet (External switch) adapter from hyper-v to route my internet (this was needed to get LAN IP addresses for my hyper-v VMs).
Adding...

spring:
  cloud:
    inetutils:
      preferred-networks:
        - 192.168

...should have fixed this, but due to the config not getting picked up in the post processor, the startup delay is not fully prevented.

spring-cloud-commons version: 4.0.2
sample project: https://github.com/CodeQualIT/CQITFunctions

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions