Zhengcy05 opened a new pull request, #8187:
URL: https://github.com/apache/incubator-seata/pull/8187

   - [x] I have read the 
[CONTRIBUTING.md](https://github.com/apache/incubator-seata/blob/2.x/CONTRIBUTING.md)
 guidelines.
   - [ ] I have registered the PR 
[changes](https://github.com/apache/incubator-seata/tree/2.x/changes).
   
   ### Ⅰ. Describe what this PR did
   
   This PR fixes the server-side registry network configuration lookup for 
`registry.preferredNetworks` and `registry.ignoredInterfaces`.
   
   Previously, `Server` read these options through 
`ConfigurationFactory.getInstance()`. When `seata.config.type=nacos` is 
configured, that instance points to the config center, so local Spring Boot 
configuration such as `seata.registry.preferred-networks` and 
`seata.registry.ignored-interfaces` in `application.yml` may be ignored.
   
   This PR changes the lookup to:
   - read from `ConfigurationFactory.CURRENT_FILE_INSTANCE` first, which is 
consistent with other registry-local configuration lookup paths
   - fallback to `ConfigurationFactory.getInstance()` when the local registry 
configuration does not provide the value
   - add `ignoredInterfaces` to `RegistryProperties`
   - add regression coverage for the local-first lookup behavior
   
   ### Ⅱ. Does this pull request fix one issue?
   
   fixes #8182
   
   ### Ⅲ. Why don't you add test cases (unit test/integration test)?
   
   Added test cases.
   
   ### Ⅳ. Describe how to verify it
   
   - `mvn -pl server -am -Dtest=org.apache.seata.server.ServerConfigTest 
-DfailIfNoTests=false test`
   - `mvn -pl spring/seata-spring-autoconfigure/seata-spring-autoconfigure-core 
-am 
-Dtest=org.apache.seata.spring.boot.autoconfigure.properties.registry.RegistryPropertiesTest
 -DfailIfNoTests=false test`
   
   ### Ⅴ. Special notes for reviews


-- 
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]

Reply via email to