From 3e1d79d03316b7a16a6b674fce8d0b22503a1185 Mon Sep 17 00:00:00 2001 From: lepdou Date: Sat, 16 Jul 2022 16:04:20 +0800 Subject: [PATCH] Specification apollo code reference notes (#442) --- CHANGELOG.md | 1 + .../config/annotation/PolarisConfigAnnotationProcessor.java | 2 +- .../config/annotation/PolarisConfigKVFileChangeListener.java | 2 +- .../polaris/config/listener/PolarisConfigListenerContext.java | 2 +- .../polaris/config/spring/annotation/SpringValueProcessor.java | 3 +++ .../polaris/config/spring/property/PlaceholderHelper.java | 3 +++ .../cloud/polaris/config/spring/property/SpringValue.java | 3 +++ .../polaris/config/spring/property/SpringValueDefinition.java | 3 +++ .../config/spring/property/SpringValueDefinitionProcessor.java | 3 ++- .../polaris/config/spring/property/SpringValueRegistry.java | 3 +++ 10 files changed, 21 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a16ddae21..44c0b887e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,3 +6,4 @@ - [Feature: Optimized configuration update](https://github.com/Tencent/spring-cloud-tencent/pull/423) - [Feature: add feature-env plugin & add spring cloud gateway staining plugin](https://github.com/Tencent/spring-cloud-tencent/pull/428) - [Optimize: add EncodeTransferMedataRestTemplateInterceptor to RestTemplate](https://github.com/Tencent/spring-cloud-tencent/pull/434) +- [Optimize: Specification apollo code reference notes](https://github.com/Tencent/spring-cloud-tencent/pull/442) diff --git a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/annotation/PolarisConfigAnnotationProcessor.java b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/annotation/PolarisConfigAnnotationProcessor.java index 59bbb994c..52704cc9b 100644 --- a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/annotation/PolarisConfigAnnotationProcessor.java +++ b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/annotation/PolarisConfigAnnotationProcessor.java @@ -40,7 +40,7 @@ import static com.tencent.cloud.polaris.config.listener.PolarisConfigListenerCon /** * {@link PolarisConfigAnnotationProcessor} implementation for spring . - *

Refer to the Apollo project implementation: + *

This source file was reference from: * * ApolloAnnotationProcessor * @author Palmer Xu 2022-06-07 diff --git a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/annotation/PolarisConfigKVFileChangeListener.java b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/annotation/PolarisConfigKVFileChangeListener.java index a324c4d78..d5e291996 100644 --- a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/annotation/PolarisConfigKVFileChangeListener.java +++ b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/annotation/PolarisConfigKVFileChangeListener.java @@ -26,7 +26,7 @@ import java.lang.annotation.Target; /** * Configuring the change listener annotation. - *

Refer to the Apollo project implementation: + *

This source file was reference from: * * ApolloAnnotationProcessor * @author Palmer Xu 2022-05-31 diff --git a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/listener/PolarisConfigListenerContext.java b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/listener/PolarisConfigListenerContext.java index 15a9a9336..6bd266bf8 100644 --- a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/listener/PolarisConfigListenerContext.java +++ b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/listener/PolarisConfigListenerContext.java @@ -49,7 +49,7 @@ import static com.tencent.polaris.configuration.api.core.ChangeType.MODIFIED; /** * Polaris Config Listener Context Defined . - *

Refer to the Apollo project implementation: + *

This source file was reference from: * * AbstractConfig * diff --git a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/annotation/SpringValueProcessor.java b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/annotation/SpringValueProcessor.java index 90e83f080..d7d09912b 100644 --- a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/annotation/SpringValueProcessor.java +++ b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/annotation/SpringValueProcessor.java @@ -30,6 +30,9 @@ import org.springframework.context.annotation.Bean; /** * Spring value processor of field or method which has @Value and xml config placeholders. + *
+ *
+ * This source file was originally from: * * SpringValueProcessor * diff --git a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/property/PlaceholderHelper.java b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/property/PlaceholderHelper.java index 0caf41b1d..2d7515661 100644 --- a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/property/PlaceholderHelper.java +++ b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/property/PlaceholderHelper.java @@ -31,6 +31,9 @@ import org.springframework.util.StringUtils; /** * Placeholder helper functions. + *
+ *
+ * This source file was originally from: * * PlaceholderHelper * diff --git a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/property/SpringValue.java b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/property/SpringValue.java index 501c58eef..1f0396112 100644 --- a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/property/SpringValue.java +++ b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/property/SpringValue.java @@ -27,6 +27,9 @@ import org.springframework.core.MethodParameter; /** * Spring @Value method info. + *
+ *
+ * This source file was originally from: * * SpringValue * diff --git a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/property/SpringValueDefinition.java b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/property/SpringValueDefinition.java index 4f73edb77..a3382fd5d 100644 --- a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/property/SpringValueDefinition.java +++ b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/property/SpringValueDefinition.java @@ -19,6 +19,9 @@ package com.tencent.cloud.polaris.config.spring.property; /** * Spring value. + *
+ *
+ * This source file was originally from: * * SpringValueDefinition * diff --git a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/property/SpringValueDefinitionProcessor.java b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/property/SpringValueDefinitionProcessor.java index 4b814266a..56ed62391 100644 --- a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/property/SpringValueDefinitionProcessor.java +++ b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/property/SpringValueDefinitionProcessor.java @@ -40,12 +40,13 @@ import org.springframework.beans.factory.support.BeanDefinitionRegistryPostProce * To process xml config placeholders, e.g. * *

- *  <bean class="com.ctrip.framework.apollo.demo.spring.xmlConfigDemo.bean.XmlBean">
+ *  <bean class="com.demo.bean.XmlBean">
  *    <property name="timeout" value="${timeout:200}"/>
  *    <property name="batch" value="${batch:100}"/>
  *  </bean>
  * 
* + * This source file was originally from: * * SpringValueDefinitionProcessor * diff --git a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/property/SpringValueRegistry.java b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/property/SpringValueRegistry.java index 6bf09c770..9155c923c 100644 --- a/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/property/SpringValueRegistry.java +++ b/spring-cloud-starter-tencent-polaris-config/src/main/java/com/tencent/cloud/polaris/config/spring/property/SpringValueRegistry.java @@ -36,6 +36,9 @@ import org.springframework.beans.factory.BeanFactory; /** * Spring value auto registry. + *
+ *
+ * This source file was originally from: * * SpringValueRegistry *