diff --git a/.travis.yml b/.travis.yml
index 5bd561fbe665d6fc31d5acbb354d50df0ff970de..d9296a3310d8ec9f4f94da90d9da94df5a79374e 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -24,8 +24,8 @@ branches:
env:
global:
- - secure: "DYJkJ7ArGJuIyTJsmjvUAJRyUKXEaGFWYZFAGZq6vxbrMN3tThz7drfNhhvP2YE7hdS7YX7hZBWVQEnNR+pBN+ykQFx7TpLr311eEk2/Yy3G5qegeHMsgqYXfAp3FFpYlE6Kr3Dcf4kFSWtRi735kSo5oHicoaxbyWENgmKT+uQjYERKhDXEoenMaDpcf8WO8KARzxI1cXf69ECnYP2rzNOfkNW4IGjTcJnplXPZ9BNBRn3WfyPwEHlemETAMwJxJXolNM9qn1bDBTB/35yJrneQY/pYp9Q8PbQID2lNJu7PFKYaI9mvsKHUgxjbzsC29zlMY94pDr6sQtr7IA0dSuk+qO2tEqAStTwRI5JOcozLAslTMNnUn6HLvy0/Kkq1TL+JrIohoRD58F34SzjcnuB4w0/GCWGU4BMSbzPwHsgQZM4lkHDWv+w1OSwP3dgCFI/vYYr9xNV0zqTgyZ9ITkMZPL0wOh0DZ7Bxxm80wyHfJuRwywemMtzitgjPR4BKENbpcoGN4lcKWciksAuiyX+dedOPfGoOWfnIKh1g7yeVB84LMggCSad/9cqnYf2Sm8xSyVzNmyhSOy2Ocy40RDas2uHIK3/QPy56Le/t1LD2On/x1TZBIoSavedNYA5N54s/ZCDZOcepUMvlwtjgnx/SMjU85ZLKCcliPGdTWws="
- - "MAVEN_OPTS=-Xms1024m -Xmx3072m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m"
+ - secure: "DYJkJ7ArGJuIyTJsmjvUAJRyUKXEaGFWYZFAGZq6vxbrMN3tThz7drfNhhvP2YE7hdS7YX7hZBWVQEnNR+pBN+ykQFx7TpLr311eEk2/Yy3G5qegeHMsgqYXfAp3FFpYlE6Kr3Dcf4kFSWtRi735kSo5oHicoaxbyWENgmKT+uQjYERKhDXEoenMaDpcf8WO8KARzxI1cXf69ECnYP2rzNOfkNW4IGjTcJnplXPZ9BNBRn3WfyPwEHlemETAMwJxJXolNM9qn1bDBTB/35yJrneQY/pYp9Q8PbQID2lNJu7PFKYaI9mvsKHUgxjbzsC29zlMY94pDr6sQtr7IA0dSuk+qO2tEqAStTwRI5JOcozLAslTMNnUn6HLvy0/Kkq1TL+JrIohoRD58F34SzjcnuB4w0/GCWGU4BMSbzPwHsgQZM4lkHDWv+w1OSwP3dgCFI/vYYr9xNV0zqTgyZ9ITkMZPL0wOh0DZ7Bxxm80wyHfJuRwywemMtzitgjPR4BKENbpcoGN4lcKWciksAuiyX+dedOPfGoOWfnIKh1g7yeVB84LMggCSad/9cqnYf2Sm8xSyVzNmyhSOy2Ocy40RDas2uHIK3/QPy56Le/t1LD2On/x1TZBIoSavedNYA5N54s/ZCDZOcepUMvlwtjgnx/SMjU85ZLKCcliPGdTWws="
+ - "MAVEN_OPTS=-Xms1024m -Xmx3072m -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=384m"
addons:
coverity_scan:
@@ -39,4 +39,4 @@ addons:
cache:
directories:
- - $HOME/.m2
+ - $HOME/.m2
diff --git a/README.md b/README.md
index dc8a9a50012b3e6a163355f4476502858b7f66ce..10103de696ddeee560aea88d8afe9e4f243252c4 100644
--- a/README.md
+++ b/README.md
@@ -155,3 +155,4 @@ The project is licensed under the [Apache 2 license](https://github.com/ctripcor
![蘑菇租房](https://github.com/ctripcorp/apollo/blob/master/doc/images/known-users/mgzf.png)
![狐狸金服](https://github.com/ctripcorp/apollo/blob/master/doc/images/known-users/huli-logo.png)
![漫道集团](https://github.com/ctripcorp/apollo/blob/master/doc/images/known-users/mandao.png)
+![怪兽充电](https://github.com/ctripcorp/apollo/blob/master/doc/images/known-users/enmonster.png)
diff --git a/apollo-adminservice/pom.xml b/apollo-adminservice/pom.xml
index ad3face0dd77ddbb798162ba01cae93826594d82..7ec73a347095a5e5971d76118a3d1f2bfc7590f9 100644
--- a/apollo-adminservice/pom.xml
+++ b/apollo-adminservice/pom.xml
@@ -4,7 +4,7 @@
com.ctrip.framework.apollo
apollo
- 0.10.0-SNAPSHOT
+ 0.10.2
../pom.xml
4.0.0
diff --git a/apollo-adminservice/src/main/docker/Dockerfile b/apollo-adminservice/src/main/docker/Dockerfile
index 84083570ded055b14e64325d795302a3dee8a004..099ef4a3432c5eaadbbb035168d968391d6dc8ea 100755
--- a/apollo-adminservice/src/main/docker/Dockerfile
+++ b/apollo-adminservice/src/main/docker/Dockerfile
@@ -7,7 +7,7 @@
FROM openjdk:8-jre-alpine
MAINTAINER ameizi
-ENV VERSION 0.10.0-SNAPSHOT
+ENV VERSION 0.10.2
RUN echo "http://mirrors.aliyun.com/alpine/v3.6/main" > /etc/apk/repositories \
&& echo "http://mirrors.aliyun.com/alpine/v3.6/community" >> /etc/apk/repositories \
diff --git a/apollo-assembly/pom.xml b/apollo-assembly/pom.xml
index 7960216b20982b223b9c68349c2c00bfd921a414..bb3078dd7106c25f11a0ca48993a7123d7882bf0 100644
--- a/apollo-assembly/pom.xml
+++ b/apollo-assembly/pom.xml
@@ -4,7 +4,7 @@
com.ctrip.framework.apollo
apollo
- 0.10.0-SNAPSHOT
+ 0.10.2
../pom.xml
4.0.0
diff --git a/apollo-biz/pom.xml b/apollo-biz/pom.xml
index a70c7ee222700e4b7306a2b47e4a0acc8f7b006a..5f9c1e21838396cbacc958350ce109ba969570ae 100644
--- a/apollo-biz/pom.xml
+++ b/apollo-biz/pom.xml
@@ -4,7 +4,7 @@
com.ctrip.framework.apollo
apollo
- 0.10.0-SNAPSHOT
+ 0.10.2
4.0.0
apollo-biz
diff --git a/apollo-buildtools/pom.xml b/apollo-buildtools/pom.xml
index c77e60f0fca0c0d6778a1329f5bd63e15fcf857a..727923a21eca0e21ee651721fde35a1cfdde22b6 100644
--- a/apollo-buildtools/pom.xml
+++ b/apollo-buildtools/pom.xml
@@ -4,7 +4,7 @@
com.ctrip.framework.apollo
apollo
- 0.10.0-SNAPSHOT
+ 0.10.2
../pom.xml
4.0.0
diff --git a/apollo-client/README.md b/apollo-client/README.md
index f42e23018ec2e12a8a13cc46b1032dd166fe3918..d0ba8f8d743e0ed6cdd5d71fa9d2cedafb7fa37a 100644
--- a/apollo-client/README.md
+++ b/apollo-client/README.md
@@ -88,7 +88,7 @@ If you need this functionality, you could specify the cluster as follows:
com.ctrip.framework.apollo
apollo-client
- 0.9.1
+ 0.10.2
## III. Client Usage
diff --git a/apollo-client/pom.xml b/apollo-client/pom.xml
index cae8e1949550309fd8716904dec919cee1cd25dd..7fcefa1b64ca2f150480fe792af8bd3159c2742b 100644
--- a/apollo-client/pom.xml
+++ b/apollo-client/pom.xml
@@ -4,7 +4,7 @@
com.ctrip.framework.apollo
apollo
- 0.10.0-SNAPSHOT
+ 0.10.2
../pom.xml
4.0.0
diff --git a/apollo-client/src/main/java/com/ctrip/framework/apollo/build/ApolloInjector.java b/apollo-client/src/main/java/com/ctrip/framework/apollo/build/ApolloInjector.java
index 62177eebb8b16a61c7c91fbe8a8e6f0f59d3da49..0bdb4851478fa3be97d8670cc5b8f60df09d7e55 100644
--- a/apollo-client/src/main/java/com/ctrip/framework/apollo/build/ApolloInjector.java
+++ b/apollo-client/src/main/java/com/ctrip/framework/apollo/build/ApolloInjector.java
@@ -10,7 +10,7 @@ import com.ctrip.framework.foundation.internals.ServiceBootstrap;
*/
public class ApolloInjector {
private static volatile Injector s_injector;
- private static Object lock = new Object();
+ private static final Object lock = new Object();
private static Injector getInjector() {
if (s_injector == null) {
diff --git a/apollo-client/src/main/java/com/ctrip/framework/apollo/internals/DefaultInjector.java b/apollo-client/src/main/java/com/ctrip/framework/apollo/internals/DefaultInjector.java
index 88f160f876a96cba67832c8af8eff36270404073..46e935ff7f8355d34f9b9303c24ec01e5f404a10 100644
--- a/apollo-client/src/main/java/com/ctrip/framework/apollo/internals/DefaultInjector.java
+++ b/apollo-client/src/main/java/com/ctrip/framework/apollo/internals/DefaultInjector.java
@@ -7,9 +7,6 @@ import com.ctrip.framework.apollo.spi.ConfigRegistry;
import com.ctrip.framework.apollo.spi.DefaultConfigFactory;
import com.ctrip.framework.apollo.spi.DefaultConfigFactoryManager;
import com.ctrip.framework.apollo.spi.DefaultConfigRegistry;
-import com.ctrip.framework.apollo.spring.config.ConfigPropertySourceFactory;
-import com.ctrip.framework.apollo.spring.property.PlaceholderHelper;
-import com.ctrip.framework.apollo.spring.property.SpringValueRegistry;
import com.ctrip.framework.apollo.tracer.Tracer;
import com.ctrip.framework.apollo.util.ConfigUtil;
import com.ctrip.framework.apollo.util.http.HttpUtil;
@@ -63,9 +60,6 @@ public class DefaultInjector implements Injector {
bind(HttpUtil.class).in(Singleton.class);
bind(ConfigServiceLocator.class).in(Singleton.class);
bind(RemoteConfigLongPollService.class).in(Singleton.class);
- bind(PlaceholderHelper.class).in(Singleton.class);
- bind(ConfigPropertySourceFactory.class).in(Singleton.class);
- bind(SpringValueRegistry.class).in(Singleton.class);
}
}
}
diff --git a/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloJsonValueProcessor.java b/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloJsonValueProcessor.java
index 3ab48646cf12d9b163d1f611a5f322828aef65cb..c64f14560a59cb78170c8bbd461a337d78ac6dd6 100644
--- a/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloJsonValueProcessor.java
+++ b/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloJsonValueProcessor.java
@@ -5,6 +5,7 @@ import com.ctrip.framework.apollo.spring.property.AutoUpdateConfigChangeListener
import com.ctrip.framework.apollo.spring.property.PlaceholderHelper;
import com.ctrip.framework.apollo.spring.property.SpringValue;
import com.ctrip.framework.apollo.spring.property.SpringValueRegistry;
+import com.ctrip.framework.apollo.spring.util.SpringInjector;
import com.ctrip.framework.apollo.util.ConfigUtil;
import com.google.common.base.Preconditions;
import com.google.gson.Gson;
@@ -37,8 +38,8 @@ public class ApolloJsonValueProcessor extends ApolloProcessor implements BeanFac
public ApolloJsonValueProcessor() {
configUtil = ApolloInjector.getInstance(ConfigUtil.class);
- placeholderHelper = ApolloInjector.getInstance(PlaceholderHelper.class);
- springValueRegistry = ApolloInjector.getInstance(SpringValueRegistry.class);
+ placeholderHelper = SpringInjector.getInstance(PlaceholderHelper.class);
+ springValueRegistry = SpringInjector.getInstance(SpringValueRegistry.class);
}
@Override
diff --git a/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/SpringValueProcessor.java b/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/SpringValueProcessor.java
index efe1076ca772e339772b27cc26f506c4b65ad964..bdcd554c5fa73807f7b91b82cd8d11d377a894cc 100644
--- a/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/SpringValueProcessor.java
+++ b/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/SpringValueProcessor.java
@@ -7,6 +7,7 @@ import com.ctrip.framework.apollo.spring.property.SpringValue;
import com.ctrip.framework.apollo.spring.property.SpringValueDefinition;
import com.ctrip.framework.apollo.spring.property.SpringValueDefinitionProcessor;
import com.ctrip.framework.apollo.spring.property.SpringValueRegistry;
+import com.ctrip.framework.apollo.spring.util.SpringInjector;
import com.ctrip.framework.apollo.util.ConfigUtil;
import com.google.common.collect.LinkedListMultimap;
import com.google.common.collect.Multimap;
@@ -43,8 +44,8 @@ public class SpringValueProcessor extends ApolloProcessor implements BeanFactory
public SpringValueProcessor() {
configUtil = ApolloInjector.getInstance(ConfigUtil.class);
- placeholderHelper = ApolloInjector.getInstance(PlaceholderHelper.class);
- springValueRegistry = ApolloInjector.getInstance(SpringValueRegistry.class);
+ placeholderHelper = SpringInjector.getInstance(PlaceholderHelper.class);
+ springValueRegistry = SpringInjector.getInstance(SpringValueRegistry.class);
}
@Override
diff --git a/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/boot/ApolloApplicationContextInitializer.java b/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/boot/ApolloApplicationContextInitializer.java
index 4f7b2640f41cddc037ef00c3dec01f35007ade33..c9d2ea64f8f0cd2798085c6decc4062372233e84 100644
--- a/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/boot/ApolloApplicationContextInitializer.java
+++ b/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/boot/ApolloApplicationContextInitializer.java
@@ -6,6 +6,7 @@ import com.ctrip.framework.apollo.build.ApolloInjector;
import com.ctrip.framework.apollo.core.ConfigConsts;
import com.ctrip.framework.apollo.spring.config.ConfigPropertySourceFactory;
import com.ctrip.framework.apollo.spring.config.PropertySourcesConstants;
+import com.ctrip.framework.apollo.spring.util.SpringInjector;
import com.google.common.base.Splitter;
import java.util.List;
import org.slf4j.Logger;
@@ -37,7 +38,7 @@ public class ApolloApplicationContextInitializer implements
private static final Logger logger = LoggerFactory.getLogger(ApolloApplicationContextInitializer.class);
private static final Splitter NAMESPACE_SPLITTER = Splitter.on(",").omitEmptyStrings().trimResults();
- private final ConfigPropertySourceFactory configPropertySourceFactory = ApolloInjector
+ private final ConfigPropertySourceFactory configPropertySourceFactory = SpringInjector
.getInstance(ConfigPropertySourceFactory.class);
@Override
diff --git a/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java b/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java
index 362dee589a6d3da092d594ffe951f9121bcc4211..b6794dddf4c92215a0c93b762a2bd227ac3f4599 100644
--- a/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java
+++ b/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java
@@ -2,6 +2,7 @@ package com.ctrip.framework.apollo.spring.config;
import com.ctrip.framework.apollo.build.ApolloInjector;
import com.ctrip.framework.apollo.spring.property.AutoUpdateConfigChangeListener;
+import com.ctrip.framework.apollo.spring.util.SpringInjector;
import com.ctrip.framework.apollo.util.ConfigUtil;
import com.google.common.collect.ImmutableSortedSet;
import com.google.common.collect.LinkedHashMultimap;
@@ -39,7 +40,7 @@ public class PropertySourcesProcessor implements BeanFactoryPostProcessor, Envir
private static final Multimap NAMESPACE_NAMES = LinkedHashMultimap.create();
private static final AtomicBoolean INITIALIZED = new AtomicBoolean(false);
- private final ConfigPropertySourceFactory configPropertySourceFactory = ApolloInjector
+ private final ConfigPropertySourceFactory configPropertySourceFactory = SpringInjector
.getInstance(ConfigPropertySourceFactory.class);
private final ConfigUtil configUtil = ApolloInjector.getInstance(ConfigUtil.class);
private ConfigurableEnvironment environment;
diff --git a/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/AutoUpdateConfigChangeListener.java b/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/AutoUpdateConfigChangeListener.java
index 830151e846b8a118dc63f81d7ead91d7bf01ed08..8e03db480997cbbe493b941c58f478515b653aa6 100644
--- a/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/AutoUpdateConfigChangeListener.java
+++ b/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/AutoUpdateConfigChangeListener.java
@@ -2,9 +2,11 @@ package com.ctrip.framework.apollo.spring.property;
import com.ctrip.framework.apollo.ConfigChangeListener;
import com.ctrip.framework.apollo.build.ApolloInjector;
+import com.ctrip.framework.apollo.enums.PropertyChangeType;
import com.ctrip.framework.apollo.model.ConfigChange;
import com.ctrip.framework.apollo.model.ConfigChangeEvent;
import com.ctrip.framework.apollo.spring.annotation.SpringValueProcessor;
+import com.ctrip.framework.apollo.spring.util.SpringInjector;
import com.google.gson.Gson;
import java.lang.reflect.Field;
import java.lang.reflect.Type;
@@ -38,8 +40,8 @@ public class AutoUpdateConfigChangeListener implements ConfigChangeListener{
this.beanFactory = beanFactory;
this.typeConverter = this.beanFactory.getTypeConverter();
this.environment = environment;
- this.placeholderHelper = ApolloInjector.getInstance(PlaceholderHelper.class);
- this.springValueRegistry = ApolloInjector.getInstance(SpringValueRegistry.class);
+ this.placeholderHelper = SpringInjector.getInstance(PlaceholderHelper.class);
+ this.springValueRegistry = SpringInjector.getInstance(SpringValueRegistry.class);
this.gson = new Gson();
}
@@ -57,8 +59,7 @@ public class AutoUpdateConfigChangeListener implements ConfigChangeListener{
}
// 2. check whether the value is really changed or not (since spring property sources have hierarchies)
- ConfigChange configChange = changeEvent.getChange(key);
- if (!Objects.equals(environment.getProperty(key), configChange.getNewValue())) {
+ if (!shouldTriggerAutoUpdate(changeEvent, key)) {
continue;
}
@@ -69,13 +70,30 @@ public class AutoUpdateConfigChangeListener implements ConfigChangeListener{
}
}
+ /**
+ * Check whether we should trigger the auto update or not.
+ *
+ * For added or modified keys, we should trigger auto update if the current value in Spring equals to the new value.
+ *
+ * For deleted keys, we will trigger auto update anyway.
+ */
+ private boolean shouldTriggerAutoUpdate(ConfigChangeEvent changeEvent, String changedKey) {
+ ConfigChange configChange = changeEvent.getChange(changedKey);
+
+ if (configChange.getChangeType() == PropertyChangeType.DELETED) {
+ return true;
+ }
+
+ return Objects.equals(environment.getProperty(changedKey), configChange.getNewValue());
+ }
+
private void updateSpringValue(SpringValue springValue) {
try {
Object value = resolvePropertyValue(springValue);
springValue.update(value);
logger.debug("Auto update apollo changed value successfully, new value: {}, {}", value,
- springValue.toString());
+ springValue);
} catch (Throwable ex) {
logger.error("Auto update apollo changed value failed, {}", springValue.toString(), ex);
}
diff --git a/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/SpringValueDefinitionProcessor.java b/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/SpringValueDefinitionProcessor.java
index 4d44b266cef629bfb4feb9741a40d8c7757b1e3a..b1ce51abc8bfa826732ea25b07c25bba96015d3d 100644
--- a/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/SpringValueDefinitionProcessor.java
+++ b/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/SpringValueDefinitionProcessor.java
@@ -1,5 +1,6 @@
package com.ctrip.framework.apollo.spring.property;
+import com.ctrip.framework.apollo.spring.util.SpringInjector;
import java.util.List;
import java.util.Set;
@@ -38,7 +39,7 @@ public class SpringValueDefinitionProcessor implements BeanDefinitionRegistryPos
public SpringValueDefinitionProcessor() {
configUtil = ApolloInjector.getInstance(ConfigUtil.class);
- placeholderHelper = ApolloInjector.getInstance(PlaceholderHelper.class);
+ placeholderHelper = SpringInjector.getInstance(PlaceholderHelper.class);
}
@Override
diff --git a/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/util/SpringInjector.java b/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/util/SpringInjector.java
new file mode 100644
index 0000000000000000000000000000000000000000..4b9004081c17958859d33829db2c1d163c7a49b8
--- /dev/null
+++ b/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/util/SpringInjector.java
@@ -0,0 +1,53 @@
+package com.ctrip.framework.apollo.spring.util;
+
+import com.ctrip.framework.apollo.exceptions.ApolloConfigException;
+import com.ctrip.framework.apollo.spring.config.ConfigPropertySourceFactory;
+import com.ctrip.framework.apollo.spring.property.PlaceholderHelper;
+import com.ctrip.framework.apollo.spring.property.SpringValueRegistry;
+import com.ctrip.framework.apollo.tracer.Tracer;
+import com.google.inject.AbstractModule;
+import com.google.inject.Guice;
+import com.google.inject.Injector;
+import com.google.inject.Singleton;
+
+public class SpringInjector {
+ private static volatile Injector s_injector;
+ private static final Object lock = new Object();
+
+ private static Injector getInjector() {
+ if (s_injector == null) {
+ synchronized (lock) {
+ if (s_injector == null) {
+ try {
+ s_injector = Guice.createInjector(new SpringModule());
+ } catch (Throwable ex) {
+ ApolloConfigException exception = new ApolloConfigException("Unable to initialize Apollo Spring Injector!", ex);
+ Tracer.logError(exception);
+ throw exception;
+ }
+ }
+ }
+ }
+
+ return s_injector;
+ }
+
+ public static T getInstance(Class clazz) {
+ try {
+ return getInjector().getInstance(clazz);
+ } catch (Throwable ex) {
+ Tracer.logError(ex);
+ throw new ApolloConfigException(
+ String.format("Unable to load instance for %s!", clazz.getName()), ex);
+ }
+ }
+
+ private static class SpringModule extends AbstractModule {
+ @Override
+ protected void configure() {
+ bind(PlaceholderHelper.class).in(Singleton.class);
+ bind(ConfigPropertySourceFactory.class).in(Singleton.class);
+ bind(SpringValueRegistry.class).in(Singleton.class);
+ }
+ }
+}
diff --git a/apollo-client/src/test/java/com/ctrip/framework/apollo/spring/JavaConfigPlaceholderAutoUpdateTest.java b/apollo-client/src/test/java/com/ctrip/framework/apollo/spring/JavaConfigPlaceholderAutoUpdateTest.java
index d799559b3e1022de08584ab1b83e18d92f697dbe..51683f1416030e995699ace47eb1b1d255138f63 100644
--- a/apollo-client/src/test/java/com/ctrip/framework/apollo/spring/JavaConfigPlaceholderAutoUpdateTest.java
+++ b/apollo-client/src/test/java/com/ctrip/framework/apollo/spring/JavaConfigPlaceholderAutoUpdateTest.java
@@ -65,7 +65,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
assertEquals(newTimeout, bean.getTimeout());
assertEquals(newBatch, bean.getBatch());
@@ -98,7 +98,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
assertEquals(newTimeout, javaConfigBean.getTimeout());
assertEquals(newBatch, javaConfigBean.getBatch());
@@ -135,7 +135,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
assertEquals(initialTimeout, bean.getTimeout());
assertEquals(initialBatch, bean.getBatch());
@@ -165,7 +165,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
applicationConfig.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newApplicationProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
assertEquals(newTimeout, bean.getTimeout());
assertEquals(initialBatch, bean.getBatch());
@@ -174,7 +174,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
fxApolloConfig.onRepositoryChange(FX_APOLLO_NAMESPACE, newFxApolloProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
assertEquals(newTimeout, bean.getTimeout());
assertEquals(newBatch, bean.getBatch());
@@ -192,7 +192,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
Properties fxApolloProperties =
assembleProperties(TIMEOUT_PROPERTY, String.valueOf(someTimeout), BATCH_PROPERTY, String.valueOf(anotherBatch));
- SimpleConfig applicationConfig = prepareConfig(ConfigConsts.NAMESPACE_APPLICATION, applicationProperties);
+ prepareConfig(ConfigConsts.NAMESPACE_APPLICATION, applicationProperties);
SimpleConfig fxApolloConfig = prepareConfig(FX_APOLLO_NAMESPACE, fxApolloProperties);
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppConfig2.class);
@@ -207,7 +207,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
fxApolloConfig.onRepositoryChange(FX_APOLLO_NAMESPACE, newFxApolloProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
assertEquals(someNewTimeout, bean.getTimeout());
assertEquals(someBatch, bean.getBatch());
@@ -235,7 +235,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
applicationConfig.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newApplicationProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
assertEquals(newTimeout, bean.getTimeout());
assertEquals(newBatch, bean.getBatch());
@@ -268,7 +268,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
applicationConfig.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newApplicationProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
assertEquals(initialTimeout, bean.getTimeout());
assertEquals(DEFAULT_BATCH, bean.getBatch());
@@ -295,12 +295,42 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
assertEquals(DEFAULT_TIMEOUT, bean.getTimeout());
assertEquals(DEFAULT_BATCH, bean.getBatch());
}
+ @Test
+ public void testAutoUpdateWithMultipleNamespacesWithSamePropertiesDeleted() throws Exception {
+ int someTimeout = 1000;
+ int someBatch = 2000;
+ int anotherBatch = 3000;
+
+ Properties applicationProperties = assembleProperties(BATCH_PROPERTY, String.valueOf(someBatch));
+ Properties fxApolloProperties =
+ assembleProperties(TIMEOUT_PROPERTY, String.valueOf(someTimeout), BATCH_PROPERTY, String.valueOf(anotherBatch));
+
+ SimpleConfig applicationConfig = prepareConfig(ConfigConsts.NAMESPACE_APPLICATION, applicationProperties);
+ prepareConfig(FX_APOLLO_NAMESPACE, fxApolloProperties);
+
+ AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppConfig2.class);
+
+ TestJavaConfigBean bean = context.getBean(TestJavaConfigBean.class);
+
+ assertEquals(someTimeout, bean.getTimeout());
+ assertEquals(someBatch, bean.getBatch());
+
+ Properties newProperties = new Properties();
+
+ applicationConfig.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
+
+ TimeUnit.MILLISECONDS.sleep(100);
+
+ assertEquals(someTimeout, bean.getTimeout());
+ assertEquals(anotherBatch, bean.getBatch());
+ }
+
@Test
public void testAutoUpdateWithDeletedPropertiesWithNoDefaultValue() throws Exception {
int initialTimeout = 1000;
@@ -323,7 +353,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
assertEquals(newTimeout, bean.getTimeout());
assertEquals(initialBatch, bean.getBatch());
@@ -353,7 +383,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
assertEquals(newTimeout, bean.getTimeout());
assertEquals(initialBatch, bean.getBatch());
@@ -383,7 +413,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
// Does not support this scenario
assertEquals(initialTimeout, bean.getTimeout());
@@ -414,7 +444,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
// Does not support this scenario
assertEquals(initialTimeout, bean.getTimeout());
@@ -445,7 +475,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
// Does not support this scenario
assertEquals(initialTimeout, bean.getTimeout());
@@ -476,7 +506,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
// Does not support this scenario
assertEquals(initialTimeout, bean.getTimeout());
@@ -507,7 +537,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
assertEquals(someNewValue, bean.getNestedProperty());
}
@@ -535,7 +565,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
// Does not support this scenario
assertEquals(someValue, bean.getNestedProperty());
@@ -564,7 +594,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
assertEquals(someNewValue, bean.getNestedProperty());
}
@@ -601,7 +631,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
assertEquals(someNewValue, bean.getNestedProperty());
}
@@ -683,7 +713,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
assertEquals(someNewInt, bean.getIntProperty());
assertArrayEquals(someNewIntArray, bean.getIntArrayProperty());
@@ -721,7 +751,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
// should not change anything
assertTrue(jsonBean == bean.getJsonBean());
@@ -748,7 +778,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
// should not change anything
assertTrue(jsonBean == bean.getJsonBean());
@@ -775,7 +805,7 @@ public class JavaConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegrati
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
JsonBean newJsonBean = bean.getJsonBean();
diff --git a/apollo-client/src/test/java/com/ctrip/framework/apollo/spring/XmlConfigPlaceholderAutoUpdateTest.java b/apollo-client/src/test/java/com/ctrip/framework/apollo/spring/XmlConfigPlaceholderAutoUpdateTest.java
index 161be3e592d3696df40c6a9e9828b6d21b462710..1c5336f31a7c40b2dd303c13a7c56c51a8b02cee 100644
--- a/apollo-client/src/test/java/com/ctrip/framework/apollo/spring/XmlConfigPlaceholderAutoUpdateTest.java
+++ b/apollo-client/src/test/java/com/ctrip/framework/apollo/spring/XmlConfigPlaceholderAutoUpdateTest.java
@@ -49,7 +49,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
assertEquals(newTimeout, bean.getTimeout());
assertEquals(newBatch, bean.getBatch());
@@ -84,7 +84,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
assertEquals(initialTimeout, bean.getTimeout());
assertEquals(initialBatch, bean.getBatch());
@@ -119,7 +119,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio
applicationConfig
.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newApplicationProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
assertEquals(newTimeout, bean.getTimeout());
assertEquals(initialBatch, bean.getBatch());
@@ -128,7 +128,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio
fxApolloConfig.onRepositoryChange(FX_APOLLO_NAMESPACE, newFxApolloProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
assertEquals(newTimeout, bean.getTimeout());
assertEquals(newBatch, bean.getBatch());
@@ -147,8 +147,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio
Properties fxApolloProperties = assembleProperties(TIMEOUT_PROPERTY,
String.valueOf(someTimeout), BATCH_PROPERTY, String.valueOf(anotherBatch));
- SimpleConfig applicationConfig = prepareConfig(ConfigConsts.NAMESPACE_APPLICATION,
- applicationProperties);
+ prepareConfig(ConfigConsts.NAMESPACE_APPLICATION, applicationProperties);
SimpleConfig fxApolloConfig = prepareConfig(FX_APOLLO_NAMESPACE, fxApolloProperties);
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring/XmlConfigPlaceholderTest3.xml");
@@ -163,7 +162,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio
fxApolloConfig.onRepositoryChange(FX_APOLLO_NAMESPACE, newFxApolloProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
assertEquals(someNewTimeout, bean.getTimeout());
assertEquals(someBatch, bean.getBatch());
@@ -194,7 +193,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio
applicationConfig
.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newApplicationProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
assertEquals(newTimeout, bean.getTimeout());
assertEquals(newBatch, bean.getBatch());
@@ -229,7 +228,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio
applicationConfig
.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newApplicationProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
assertEquals(initialTimeout, bean.getTimeout());
assertEquals(DEFAULT_BATCH, bean.getBatch());
@@ -256,12 +255,44 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
assertEquals(DEFAULT_TIMEOUT, bean.getTimeout());
assertEquals(DEFAULT_BATCH, bean.getBatch());
}
+ @Test
+ public void testAutoUpdateWithMultipleNamespacesWithSamePropertiesDeleted() throws Exception {
+ int someTimeout = 1000;
+ int someBatch = 2000;
+ int anotherBatch = 3000;
+
+ Properties applicationProperties = assembleProperties(BATCH_PROPERTY,
+ String.valueOf(someBatch));
+ Properties fxApolloProperties = assembleProperties(TIMEOUT_PROPERTY,
+ String.valueOf(someTimeout), BATCH_PROPERTY, String.valueOf(anotherBatch));
+
+ SimpleConfig applicationConfig = prepareConfig(ConfigConsts.NAMESPACE_APPLICATION,
+ applicationProperties);
+ prepareConfig(FX_APOLLO_NAMESPACE, fxApolloProperties);
+
+ ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("spring/XmlConfigPlaceholderTest3.xml");
+
+ TestXmlBean bean = context.getBean(TestXmlBean.class);
+
+ assertEquals(someTimeout, bean.getTimeout());
+ assertEquals(someBatch, bean.getBatch());
+
+ Properties newProperties = new Properties();
+
+ applicationConfig.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
+
+ TimeUnit.MILLISECONDS.sleep(100);
+
+ assertEquals(someTimeout, bean.getTimeout());
+ assertEquals(anotherBatch, bean.getBatch());
+ }
+
@Test
public void testAutoUpdateWithDeletedPropertiesWithNoDefaultValue() throws Exception {
int initialTimeout = 1000;
@@ -284,7 +315,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
assertEquals(newTimeout, bean.getTimeout());
assertEquals(initialBatch, bean.getBatch());
@@ -314,7 +345,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
assertEquals(newTimeout, bean.getTimeout());
assertEquals(initialBatch, bean.getBatch());
@@ -344,7 +375,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
// Does not support this scenario
assertEquals(initialTimeout, bean.getTimeout());
@@ -375,7 +406,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
assertEquals(newTimeout, bean.getTimeout());
assertEquals(newBatch, bean.getBatch());
@@ -451,7 +482,7 @@ public class XmlConfigPlaceholderAutoUpdateTest extends AbstractSpringIntegratio
config.onRepositoryChange(ConfigConsts.NAMESPACE_APPLICATION, newProperties);
- TimeUnit.MILLISECONDS.sleep(50);
+ TimeUnit.MILLISECONDS.sleep(100);
assertEquals(someNewInt, bean.getIntProperty());
assertArrayEquals(someNewIntArray, bean.getIntArrayProperty());
diff --git a/apollo-common/pom.xml b/apollo-common/pom.xml
index 3f132fdebaf44b39963657a860e7e4963077e224..1da71ff248ce96067ca2f68dd4f7c12c384adbe5 100644
--- a/apollo-common/pom.xml
+++ b/apollo-common/pom.xml
@@ -4,7 +4,7 @@
com.ctrip.framework.apollo
apollo
- 0.10.0-SNAPSHOT
+ 0.10.2
../pom.xml
4.0.0
diff --git a/apollo-configservice/pom.xml b/apollo-configservice/pom.xml
index 37cc7e582e7c06c6ab88367519af961e780b7d15..85a783b95471642a675a779a48d588ccc5b619be 100644
--- a/apollo-configservice/pom.xml
+++ b/apollo-configservice/pom.xml
@@ -4,7 +4,7 @@
com.ctrip.framework.apollo
apollo
- 0.10.0-SNAPSHOT
+ 0.10.2
../pom.xml
4.0.0
diff --git a/apollo-configservice/src/main/docker/Dockerfile b/apollo-configservice/src/main/docker/Dockerfile
index 803b929fc51242b80c67e6f06eb2338d70f1e6cf..5e4cc3f7e3617681aa97290f01f028915252aed4 100755
--- a/apollo-configservice/src/main/docker/Dockerfile
+++ b/apollo-configservice/src/main/docker/Dockerfile
@@ -7,7 +7,7 @@
FROM openjdk:8-jre-alpine
MAINTAINER ameizi
-ENV VERSION 0.10.0-SNAPSHOT
+ENV VERSION 0.10.2
RUN echo "http://mirrors.aliyun.com/alpine/v3.6/main" > /etc/apk/repositories \
&& echo "http://mirrors.aliyun.com/alpine/v3.6/community" >> /etc/apk/repositories \
diff --git a/apollo-core/pom.xml b/apollo-core/pom.xml
index aa76be57bbb7fb77bc70db8c748989c41e8860ec..41fe671678e370d9d4e9adc8b356e067924e6405 100644
--- a/apollo-core/pom.xml
+++ b/apollo-core/pom.xml
@@ -4,7 +4,7 @@
com.ctrip.framework.apollo
apollo
- 0.10.0-SNAPSHOT
+ 0.10.2
../pom.xml
4.0.0
diff --git a/apollo-demo/pom.xml b/apollo-demo/pom.xml
index cf177dc3d0a70dbe0df157d6021de20c00f11e32..5ba8ed4db1265b1df626839f1dca5dbee80e8e98 100644
--- a/apollo-demo/pom.xml
+++ b/apollo-demo/pom.xml
@@ -4,7 +4,7 @@
apollo
com.ctrip.framework.apollo
- 0.10.0-SNAPSHOT
+ 0.10.2
4.0.0
apollo-demo
diff --git a/apollo-demo/src/main/java/com/ctrip/framework/apollo/demo/spring/springBootDemo/config/SampleRedisConfig.java b/apollo-demo/src/main/java/com/ctrip/framework/apollo/demo/spring/springBootDemo/config/SampleRedisConfig.java
index 43cbeb8a17cc5ce88bc6f07ab4125c97c608657b..1cebb6affdf9b89d17aaa8e341c20c13edb757c5 100644
--- a/apollo-demo/src/main/java/com/ctrip/framework/apollo/demo/spring/springBootDemo/config/SampleRedisConfig.java
+++ b/apollo-demo/src/main/java/com/ctrip/framework/apollo/demo/spring/springBootDemo/config/SampleRedisConfig.java
@@ -27,9 +27,7 @@ import javax.annotation.PostConstruct;
*
*
* To make @ConditionalOnProperty
work properly, apollo.bootstrap.enabled
should be set to true
- * and redis.cache.enabled
should also be set to true.
- *
- * @see resources/bootstrap.yml
+ * and redis.cache.enabled
should also be set to true. Check 'src/main/resources/application.yml' for more information.
*
* @author Jason Song(song_s@ctrip.com)
*/
diff --git a/apollo-portal/pom.xml b/apollo-portal/pom.xml
index db1303fe08772dd9c1728128480dd17dc37475a8..b11dd4d5133cc88071b105dbb654e139c373202d 100644
--- a/apollo-portal/pom.xml
+++ b/apollo-portal/pom.xml
@@ -4,7 +4,7 @@
com.ctrip.framework.apollo
apollo
- 0.10.0-SNAPSHOT
+ 0.10.2
../pom.xml
4.0.0
diff --git a/apollo-portal/src/main/docker/Dockerfile b/apollo-portal/src/main/docker/Dockerfile
index 2ce6877ca53a591397dde93fd6039e7c9168252b..5bfd6adbb2f7a36093b2da9dee029c757a789b5b 100755
--- a/apollo-portal/src/main/docker/Dockerfile
+++ b/apollo-portal/src/main/docker/Dockerfile
@@ -9,7 +9,7 @@
FROM openjdk:8-jre-alpine
MAINTAINER ameizi
-ENV VERSION 0.10.0-SNAPSHOT
+ENV VERSION 0.10.2
RUN echo "http://mirrors.aliyun.com/alpine/v3.6/main" > /etc/apk/repositories \
&& echo "http://mirrors.aliyun.com/alpine/v3.6/community" >> /etc/apk/repositories \
diff --git a/doc/images/known-users/enmonster.png b/doc/images/known-users/enmonster.png
new file mode 100644
index 0000000000000000000000000000000000000000..6b64fc34045160a133505969501880d0375c00b4
Binary files /dev/null and b/doc/images/known-users/enmonster.png differ
diff --git a/pom.xml b/pom.xml
index 8ff1e5087b0a3d809b2900065376fd5141e1ab3c..5532b2af21e25f643432d655aeb68999db90ba19 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
com.ctrip.framework.apollo
apollo
- 0.10.0-SNAPSHOT
+ 0.10.2
Apollo
pom
Ctrip Configuration Center
diff --git a/scripts/sql/apolloconfigdb.sql b/scripts/sql/apolloconfigdb.sql
index 2259115e2c46b781e20f6854ef2be711633255e1..cfdb846ad420e7650a5b125956ff6a56b4e940c8 100644
--- a/scripts/sql/apolloconfigdb.sql
+++ b/scripts/sql/apolloconfigdb.sql
@@ -366,9 +366,9 @@ INSERT INTO `ServerConfig` (`Key`, `Cluster`, `Value`, `Comment`)
VALUES
('eureka.service.url', 'default', 'http://localhost:8080/eureka/', 'Eureka服务Url,多个service以英文逗号分隔'),
('namespace.lock.switch', 'default', 'false', '一次发布只能有一个人修改开关'),
+ ('item.key.length.limit', 'default', '128', 'item key 最大长度限制'),
('item.value.length.limit', 'default', '20000', 'item value最大长度限制'),
- ('config-service.cache.enabled', 'default', 'false', 'ConfigService是否开启缓存,开启后能提高性能,但是会增大内存消耗!'),
- ('item.key.length.limit', 'default', '128', 'item key 最大长度限制');
+ ('config-service.cache.enabled', 'default', 'false', 'ConfigService是否开启缓存,开启后能提高性能,但是会增大内存消耗!');
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;