fu-cheng1 opened a new pull request, #15601: URL: https://github.com/apache/dubbo/pull/15601
#6588 This change allows the dubbo.network.interface.preferred configuration to be set via Spring configuration files, rather than requiring it to be specified as a system property at startup. Currently, Dubbo determines the preferred network interface too early in the application lifecycle, due to logging mechanisms like FailsafeLogger that trigger host resolution (via NetUtils) before Spring configuration is available. To address this, a new listener DubboNetInterfaceConfigApplicationListener is introduced. It listens for the ApplicationPreparedEvent, reads the network interface configuration from the Spring Environment, and sets it into system properties if not already configured. The listener is intentionally not registered as an ApplicationContextInitializer to avoid running before PropertySourceBootstrapConfiguration in Spring Cloud environments. Additionally, since the current Dubbo version does not yet depend on a Spring Boot version that supports ApplicationContextInitializedEvent, the ApplicationPreparedEvent is chosen as a safe extension point. This change improves flexibility and integration with Spring-based configuration management, especially in Spring Cloud environments. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
