feature: add Spring Boot 2.4 config data loader support#3754
Conversation
nobodyiam
left a comment
There was a problem hiding this comment.
This is a great feature and it looks good to me.
However, since it adds a new sdk so I hope it could be reviewed by more committers.
kezhenxu94
left a comment
There was a problem hiding this comment.
Create feature, thanks!
I suggest not to mix renaming property / env var names and new feature in a single pull request next time.
renaming property is strong related to the new feature. |
Anilople
left a comment
There was a problem hiding this comment.
Great feature!
I am not familiar with spring.config.import functionality so cannot give more help.
…ollo/config/data/importer/ApolloConfigDataLoaderInitializer.java Co-authored-by: wxq <Anilople@outlook.com>
…ollo/config/data/importer/ApolloConfigDataLoaderInitializer.java Co-authored-by: wxq <Anilople@outlook.com>
…s/DeprecatedPropertyNotifyUtil.java Co-authored-by: wxq <Anilople@outlook.com>
What's the purpose of this PR
1. add Spring Boot 2.4 config data loader support
2. make apollo client system property names valid and add warn to the deprecated property names
see the unit test
ApolloClientSystemPropertyInitializerTest#testSystemPropertyNamessee the warn
com.ctrip.framework.apollo.util.ConfigUtil#getDeprecatedCustomizedCacheRootcom.ctrip.framework.foundation.internals.provider.DefaultApplicationProvider#initDeprecatedAccessKeycom.ctrip.framework.apollo.internals.ConfigServiceLocator#getDeprecatedCustomizedConfigService2.1 property names changed:
apollo.cacheDir->apollo.cache-dirapollo.accesskey.secret->apollo.access-key.secretapollo.configService->apollo.config-service2.2 environment variables names changed:
APOLLO_CACHEDIR->APOLLO_CACHE_DIRAPOLLO_ACCESSKEY_SECRET->APOLLO_ACCESS_KEY_SECRETAPOLLO_CONFIGSERVICE->APOLLO_CONFIG_SERVICE3. add webClient extension for apollo client
4. add extension messaging type
long_polling,websocketthe default value is
apollo.client.extension.messaging-type=long_pollingand thewebsocketis just a empty Implementationas a placeholder, and will complete in a future version
Which issue(s) this PR fixes:
Fixes #3697
Instruction
1. Basic Functions
1.1 add the dependency
1.2 configure the
app.id,env,apollo.metasame way as before1.3 configure
spring.config.importon application.properties or application.ymlusing default namespace
applicationor
using custom namespace
using multi namespaces
note: please put upside down of your multi namespaces.
2. webClient with spi
2.1 webClient dependency note
webClient can based on reactor netty httpclient, jetty reactive httpclient or apache httpclient5. the necessary dependency are as below
2.1.1 reactor netty httpclient
2.1.2 jetty reactive httpclient
2.1.3 apache httpclient5
2.2 add the dependency
2.3 configure the
app.id,env,apollo.metasame way as before2.4 configure
spring.config.importand other necessary properties on application.properties or application.yml2.5 provide a spi Implementation of the interface
com.ctrip.framework.apollo.config.data.extension.webclient.customizer.spi.ApolloClientWebClientCustomizerFactory