Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What's the purpose of this PR
In PR #2867, discussion_r363044605
That is this PR doing.
Now user can add their own meta server address in
PortalDB.ServerConfig
with keyapollo.portal.meta.servers
value like follow.When portal start, the value will be read to
com.ctrip.framework.apollo.portal.component.config.PortalConfig
, then classcom.ctrip.framework.apollo.portal.environment.DatabasePortalMetaServerProvider
will use those informations.Which issue(s) this PR fixes:
None.
Brief changelog
The main change under package
com.ctrip.framework.apollo.portal.environment
.For add this feature, some constant thing to be dynamic.
com.ctrip.framework.apollo.portal.environment.PortalMetaServerProvider
from class to an interface. This is for multiple meta server providers ( special for data from the database, i.ecom.ctrip.framework.apollo.portal.environment.DatabasePortalMetaServerProvider
).PortalMetaDomainConsts
->PortalMetaDomainService
. A constant class to a service, and add multi server providers when the service constructing. Use this service instead old one without change methodsFollow this checklist to help us incorporate your contribution quickly and easily:
mvn clean test
to make sure this pull request doesn't break anything.