1. 程式人生 > >攜程 Apollo 配置中心 | 學習筆記(十一)| 如何引入Apollo配置中心改造老Web專案?

攜程 Apollo 配置中心 | 學習筆記(十一)| 如何引入Apollo配置中心改造老Web專案?

本章將介紹如何從Apollo配置中心獲取配置。

專欄目錄:

歡迎關注個人公眾號:  Coder程式設計

歡迎關注個人網站:www.52melrin.com

需求:將老Web專案接入Apollo配置中心。(主要為非Maven專案)

思路:這裡主要是針對客戶端client進行修改。

一、修改Apollo-Client



pom.xml檔案

<?xml version="1.0"  encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
	<parent>
		<groupId>com.ctrip.framework.apollo</groupId>
		<artifactId>apollo</artifactId>
		<version>0.10.2</version>
		<relativePath>../pom.xml</relativePath>
	</parent>
	<modelVersion>4.0.0</modelVersion>
	<artifactId>apollo-client</artifactId>
	<name>Apollo Client</name>
	<properties>
		<java.version>1.7</java.version>
		<github.path>${project.artifactId}</github.path>
	</properties>
	<dependencies>
		<!-- apollo -->
		<dependency>
			<groupId>com.ctrip.framework.apollo</groupId>
			<artifactId>apollo-core</artifactId>
		</dependency>
		<!-- end of apollo -->
		<!-- guice -->
		<dependency>
			<groupId>com.google.inject</groupId>
			<artifactId>guice</artifactId>
		</dependency>
		<!-- end of guice -->
		<!-- log -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
		</dependency>
		<!-- optional spring dependency -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
			<optional>true</optional>
			<scope>test</scope>
		</dependency>
		<!-- optional spring boot dependency -->
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-autoconfigure</artifactId>
			<optional>true</optional>
			<scope>test</scope>
		</dependency>
		<!-- test -->
		<dependency>
			<groupId>org.eclipse.jetty</groupId>
			<artifactId>jetty-server</artifactId>
			<scope>test</scope>
		</dependency>
		<!-- take over jcl -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jcl-over-slf4j</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-slf4j-impl</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.logging.log4j</groupId>
			<artifactId>log4j-core</artifactId>
			<scope>test</scope>
		</dependency>
		<!-- end of test -->
	</dependencies>
	
	
	<build>  
     <plugins>  
        <plugin>  
            <artifactId>maven-assembly-plugin</artifactId>  
            <configuration>  
                <descriptorRefs>  
                    <descriptorRef>jar-with-dependencies</descriptorRef>  
                </descriptorRefs>  
            </configuration>  
            <executions>  
                <execution>  
                    <id>make-assembly</id> <!-- this is used for inheritance merges   -->
                    <phase>package</phase> <!-- 指定在打包節點執行jar包合併操作   -->
                    <goals>  
                        <goal>single</goal>  
                    </goals>  
                </execution>  
            </executions>  
        </plugin>  
    </plugins>   
   </build>
</project>

說明:需要將client打成Jar包,引入至老web專案lib包下。涉及的不止client包,還有其他相關依賴。所以需要新增外掛重新打包。增加<scope>test</scope> 不匯入相關jar包。避免與老web專案出現版本衝突。

二、打包

    右擊apollo-client 重新Run as——>package  進行打包。

出現如下問題:

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building Apollo Client 0.10.2
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- git-commit-id-plugin:2.2.0:revision (default) @ apollo-client ---
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ apollo-client ---
[INFO] pl.project13.maven.git.log.MavenLoggerBridge - dotGitDirectory is null, aborting execution!
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] Copying 5 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.6.0:compile (default-compile) @ apollo-client ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 73 source files to E:\Works\105localapollo\apollo-0.10.2\apollo-0.10.2\apollo-client\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/boot/ApolloApplicationContextInitializer.java:[14,35] 程式包org.springframework.context不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/boot/ApolloApplicationContextInitializer.java:[15,35] 程式包org.springframework.context不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/boot/ApolloApplicationContextInitializer.java:[16,36] 程式包org.springframework.core.env不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/boot/ApolloApplicationContextInitializer.java:[17,36] 程式包org.springframework.core.env不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/boot/ApolloApplicationContextInitializer.java:[37,5] 找不到符號
  符號: 類 ApplicationContextInitializer
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/boot/ApolloApplicationContextInitializer.java:[37,35] 找不到符號
  符號: 類 ConfigurableApplicationContext
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/boot/ApolloApplicationContextInitializer.java:[45,26] 找不到符號
  符號:   類 ConfigurableApplicationContext
  位置: 類 com.ctrip.framework.apollo.spring.boot.ApolloApplicationContextInitializer
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/ConfigPropertySource.java:[6,36] 程式包org.springframework.core.env不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/ConfigPropertySource.java:[15,43] 找不到符號
  符號: 類 EnumerablePropertySource
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/SpringValue.java:[7,32] 程式包org.springframework.core不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/SpringValue.java:[17,11] 找不到符號
  符號:   類 MethodParameter
  位置: 類 com.ctrip.framework.apollo.spring.property.SpringValue
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/SpringValue.java:[86,10] 找不到符號
  符號:   類 MethodParameter
  位置: 類 com.ctrip.framework.apollo.spring.property.SpringValue
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[16,33] 程式包org.springframework.beans不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[17,48] 程式包org.springframework.beans.factory.config不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[18,48] 程式包org.springframework.beans.factory.config不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[19,35] 程式包org.springframework.context不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[20,32] 程式包org.springframework.core不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[21,32] 程式包org.springframework.core不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[22,36] 程式包org.springframework.core.env不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[23,36] 程式包org.springframework.core.env不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[24,36] 程式包org.springframework.core.env不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[39,50] 找不到符號
  符號: 類 BeanFactoryPostProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[39,76] 找不到符號
  符號: 類 EnvironmentAware
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[39,94] 找不到符號
  符號: 類 PriorityOrdered
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[46,11] 找不到符號
  符號:   類 ConfigurableEnvironment
  位置: 類 com.ctrip.framework.apollo.spring.config.PropertySourcesProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[53,38] 找不到符號
  符號:   類 ConfigurableListableBeanFactory
  位置: 類 com.ctrip.framework.apollo.spring.config.PropertySourcesProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[53,90] 找不到符號
  符號:   類 BeansException
  位置: 類 com.ctrip.framework.apollo.spring.config.PropertySourcesProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[91,54] 找不到符號
  符號:   類 ConfigurableListableBeanFactory
  位置: 類 com.ctrip.framework.apollo.spring.config.PropertySourcesProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[106,30] 找不到符號
  符號:   類 Environment
  位置: 類 com.ctrip.framework.apollo.spring.config.PropertySourcesProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/NamespaceHandler.java:[3,49] 程式包org.springframework.beans.factory.support不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/NamespaceHandler.java:[4,45] 程式包org.springframework.beans.factory.xml不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/NamespaceHandler.java:[5,45] 程式包org.springframework.beans.factory.xml不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/NamespaceHandler.java:[6,32] 程式包org.springframework.core不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/NamespaceHandler.java:[16,39] 找不到符號
  符號: 類 NamespaceHandlerSupport
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/NamespaceHandler.java:[24,35] 找不到符號
  符號:   類 AbstractSingleBeanDefinitionParser
  位置: 類 com.ctrip.framework.apollo.spring.config.NamespaceHandler
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/NamespaceHandler.java:[36,45] 找不到符號
  符號:   類 BeanDefinitionBuilder
  位置: 類 com.ctrip.framework.apollo.spring.config.NamespaceHandler.BeanParser
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/PlaceholderHelper.java:[7,41] 程式包org.springframework.beans.factory不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/PlaceholderHelper.java:[8,48] 程式包org.springframework.beans.factory.config不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/PlaceholderHelper.java:[9,48] 程式包org.springframework.beans.factory.config不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/PlaceholderHelper.java:[10,48] 程式包org.springframework.beans.factory.config不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/PlaceholderHelper.java:[11,48] 程式包org.springframework.beans.factory.config不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/PlaceholderHelper.java:[12,32] 程式包org.springframework.util不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/PlaceholderHelper.java:[32,38] 找不到符號
  符號:   類 ConfigurableBeanFactory
  位置: 類 com.ctrip.framework.apollo.spring.property.PlaceholderHelper
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/PlaceholderHelper.java:[43,47] 找不到符號
  符號:   類 ConfigurableBeanFactory
  位置: 類 com.ctrip.framework.apollo.spring.property.PlaceholderHelper
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/PlaceholderHelper.java:[44,7] 找不到符號
  符號:   類 BeanDefinition
  位置: 類 com.ctrip.framework.apollo.spring.property.PlaceholderHelper
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/ConfigPropertySourcesProcessor.java:[6,33] 程式包org.springframework.beans不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/ConfigPropertySourcesProcessor.java:[7,49] 程式包org.springframework.beans.factory.support不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/ConfigPropertySourcesProcessor.java:[8,49] 程式包org.springframework.beans.factory.support不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/ConfigPropertySourcesProcessor.java:[9,43] 程式包org.springframework.context.support不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/ConfigPropertySourcesProcessor.java:[20,16] 找不到符號
  符號: 類 BeanDefinitionRegistryPostProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/ConfigPropertySourcesProcessor.java:[23,49] 找不到符號
  符號:   類 BeanDefinitionRegistry
  位置: 類 com.ctrip.framework.apollo.spring.config.ConfigPropertySourcesProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/ConfigPropertySourcesProcessor.java:[23,89] 找不到符號
  符號:   類 BeansException
  位置: 類 com.ctrip.framework.apollo.spring.config.ConfigPropertySourcesProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/ConfigPropertySourcesProcessor.java:[40,45] 找不到符號
  符號:   類 BeanDefinitionRegistry
  位置: 類 com.ctrip.framework.apollo.spring.config.ConfigPropertySourcesProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloJsonValueProcessor.java:[19,33] 程式包org.springframework.beans不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloJsonValueProcessor.java:[20,41] 程式包org.springframework.beans.factory不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloJsonValueProcessor.java:[21,41] 程式包org.springframework.beans.factory不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloJsonValueProcessor.java:[22,48] 程式包org.springframework.beans.factory.config不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloJsonValueProcessor.java:[23,43] 程式包org.springframework.core.annotation不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloJsonValueProcessor.java:[24,32] 程式包org.springframework.util不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloProcessor.java:[7,33] 程式包org.springframework.beans不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloProcessor.java:[8,48] 程式包org.springframework.beans.factory.config不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloProcessor.java:[9,32] 程式包org.springframework.core不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloProcessor.java:[10,32] 程式包org.springframework.core不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloProcessor.java:[11,32] 程式包org.springframework.util不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloProcessor.java:[16,50] 找不到符號
  符號: 類 BeanPostProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloProcessor.java:[16,69] 找不到符號
  符號: 類 PriorityOrdered
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloJsonValueProcessor.java:[29,74] 找不到符號
  符號: 類 BeanFactoryAware
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloJsonValueProcessor.java:[37,11] 找不到符號
  符號:   類 ConfigurableBeanFactory
  位置: 類 com.ctrip.framework.apollo.spring.annotation.ApolloJsonValueProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloJsonValueProcessor.java:[123,30] 找不到符號
  符號:   類 BeanFactory
  位置: 類 com.ctrip.framework.apollo.spring.annotation.ApolloJsonValueProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloJsonValueProcessor.java:[123,62] 找不到符號
  符號:   類 BeansException
  位置: 類 com.ctrip.framework.apollo.spring.annotation.ApolloJsonValueProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloProcessor.java:[20,14] 找不到符號
  符號:   類 BeansException
  位置: 類 com.ctrip.framework.apollo.spring.annotation.ApolloProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloProcessor.java:[32,85] 找不到符號
  符號:   類 BeansException
  位置: 類 com.ctrip.framework.apollo.spring.annotation.ApolloProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/SpringValueProcessor.java:[21,33] 程式包org.springframework.beans不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/SpringValueProcessor.java:[22,33] 程式包org.springframework.beans不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/SpringValueProcessor.java:[23,52] 程式包org.springframework.beans.factory.annotation不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/SpringValueProcessor.java:[24,48] 程式包org.springframework.beans.factory.config不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/SpringValueProcessor.java:[25,48] 程式包org.springframework.beans.factory.config不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/SpringValueProcessor.java:[26,46] 程式包org.springframework.context.annotation不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/SpringValueProcessor.java:[34,70] 找不到符號
  符號: 類 BeanFactoryPostProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/SpringValueProcessor.java:[52,38] 找不到符號
  符號:   類 ConfigurableListableBeanFactory
  位置: 類 com.ctrip.framework.apollo.spring.annotation.SpringValueProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/SpringValueProcessor.java:[53,14] 找不到符號
  符號:   類 BeansException
  位置: 類 com.ctrip.framework.apollo.spring.annotation.SpringValueProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/SpringValueProcessor.java:[62,14] 找不到符號
  符號:   類 BeansException
  位置: 類 com.ctrip.framework.apollo.spring.annotation.SpringValueProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/EnableApolloConfig.java:[9,46] 程式包org.springframework.context.annotation不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/EnableApolloConfig.java:[10,32] 程式包org.springframework.core不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/EnableApolloConfig.java:[31,2] 找不到符號
  符號: 類 Import
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/AutoUpdateConfigChangeListener.java:[18,33] 程式包org.springframework.beans不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/AutoUpdateConfigChangeListener.java:[19,48] 程式包org.springframework.beans.factory.config不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/AutoUpdateConfigChangeListener.java:[20,48] 程式包org.springframework.beans.factory.config不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/AutoUpdateConfigChangeListener.java:[21,36] 程式包org.springframework.core.env不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/AutoUpdateConfigChangeListener.java:[22,32] 程式包org.springframework.util不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/AutoUpdateConfigChangeListener.java:[31,17] 找不到符號
  符號:   類 Environment
  位置: 類 com.ctrip.framework.apollo.spring.property.AutoUpdateConfigChangeListener
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/AutoUpdateConfigChangeListener.java:[32,17] 找不到符號
  符號:   類 ConfigurableBeanFactory
  位置: 類 com.ctrip.framework.apollo.spring.property.AutoUpdateConfigChangeListener
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/AutoUpdateConfigChangeListener.java:[33,17] 找不到符號
  符號:   類 TypeConverter
  位置: 類 com.ctrip.framework.apollo.spring.property.AutoUpdateConfigChangeListener
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/AutoUpdateConfigChangeListener.java:[38,41] 找不到符號
  符號:   類 Environment
  位置: 類 com.ctrip.framework.apollo.spring.property.AutoUpdateConfigChangeListener
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/AutoUpdateConfigChangeListener.java:[38,66] 找不到符號
  符號:   類 ConfigurableListableBeanFactory
  位置: 類 com.ctrip.framework.apollo.spring.property.AutoUpdateConfigChangeListener
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/util/BeanRegistrationUtil.java:[5,48] 程式包org.springframework.beans.factory.config不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/util/BeanRegistrationUtil.java:[6,49] 程式包org.springframework.beans.factory.support不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/util/BeanRegistrationUtil.java:[7,49] 程式包org.springframework.beans.factory.support不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/util/BeanRegistrationUtil.java:[13,59] 找不到符號
  符號:   類 BeanDefinitionRegistry
  位置: 類 com.ctrip.framework.apollo.spring.util.BeanRegistrationUtil
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloConfigRegistrar.java:[4,49] 程式包org.springframework.beans.factory.support不存在
[INFO] 100 errors 
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.468 s
[INFO] Finished at: 2018-06-05T14:09:58+08:00
[INFO] Final Memory: 24M/318M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.0:compile (default-compile) on project apollo-client: Compilation failure: Compilation failure:
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/boot/ApolloApplicationContextInitializer.java:[14,35] 程式包org.springframework.context不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/boot/ApolloApplicationContextInitializer.java:[15,35] 程式包org.springframework.context不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/boot/ApolloApplicationContextInitializer.java:[16,36] 程式包org.springframework.core.env不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/boot/ApolloApplicationContextInitializer.java:[17,36] 程式包org.springframework.core.env不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/boot/ApolloApplicationContextInitializer.java:[37,5] 找不到符號
[ERROR] 符號: 類 ApplicationContextInitializer
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/boot/ApolloApplicationContextInitializer.java:[37,35] 找不到符號
[ERROR] 符號: 類 ConfigurableApplicationContext
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/boot/ApolloApplicationContextInitializer.java:[45,26] 找不到符號
[ERROR] 符號:   類 ConfigurableApplicationContext
[ERROR] 位置: 類 com.ctrip.framework.apollo.spring.boot.ApolloApplicationContextInitializer
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/ConfigPropertySource.java:[6,36] 程式包org.springframework.core.env不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/ConfigPropertySource.java:[15,43] 找不到符號
[ERROR] 符號: 類 EnumerablePropertySource
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/SpringValue.java:[7,32] 程式包org.springframework.core不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/SpringValue.java:[17,11] 找不到符號
[ERROR] 符號:   類 MethodParameter
[ERROR] 位置: 類 com.ctrip.framework.apollo.spring.property.SpringValue
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/SpringValue.java:[86,10] 找不到符號
[ERROR] 符號:   類 MethodParameter
[ERROR] 位置: 類 com.ctrip.framework.apollo.spring.property.SpringValue
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[16,33] 程式包org.springframework.beans不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[17,48] 程式包org.springframework.beans.factory.config不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[18,48] 程式包org.springframework.beans.factory.config不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[19,35] 程式包org.springframework.context不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[20,32] 程式包org.springframework.core不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[21,32] 程式包org.springframework.core不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[22,36] 程式包org.springframework.core.env不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[23,36] 程式包org.springframework.core.env不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[24,36] 程式包org.springframework.core.env不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[39,50] 找不到符號
[ERROR] 符號: 類 BeanFactoryPostProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[39,76] 找不到符號
[ERROR] 符號: 類 EnvironmentAware
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[39,94] 找不到符號
[ERROR] 符號: 類 PriorityOrdered
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[46,11] 找不到符號
[ERROR] 符號:   類 ConfigurableEnvironment
[ERROR] 位置: 類 com.ctrip.framework.apollo.spring.config.PropertySourcesProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[53,38] 找不到符號
[ERROR] 符號:   類 ConfigurableListableBeanFactory
[ERROR] 位置: 類 com.ctrip.framework.apollo.spring.config.PropertySourcesProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[53,90] 找不到符號
[ERROR] 符號:   類 BeansException
[ERROR] 位置: 類 com.ctrip.framework.apollo.spring.config.PropertySourcesProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[91,54] 找不到符號
[ERROR] 符號:   類 ConfigurableListableBeanFactory
[ERROR] 位置: 類 com.ctrip.framework.apollo.spring.config.PropertySourcesProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/PropertySourcesProcessor.java:[106,30] 找不到符號
[ERROR] 符號:   類 Environment
[ERROR] 位置: 類 com.ctrip.framework.apollo.spring.config.PropertySourcesProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/NamespaceHandler.java:[3,49] 程式包org.springframework.beans.factory.support不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/NamespaceHandler.java:[4,45] 程式包org.springframework.beans.factory.xml不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/NamespaceHandler.java:[5,45] 程式包org.springframework.beans.factory.xml不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/NamespaceHandler.java:[6,32] 程式包org.springframework.core不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/NamespaceHandler.java:[16,39] 找不到符號
[ERROR] 符號: 類 NamespaceHandlerSupport
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/NamespaceHandler.java:[24,35] 找不到符號
[ERROR] 符號:   類 AbstractSingleBeanDefinitionParser
[ERROR] 位置: 類 com.ctrip.framework.apollo.spring.config.NamespaceHandler
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/NamespaceHandler.java:[36,45] 找不到符號
[ERROR] 符號:   類 BeanDefinitionBuilder
[ERROR] 位置: 類 com.ctrip.framework.apollo.spring.config.NamespaceHandler.BeanParser
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/PlaceholderHelper.java:[7,41] 程式包org.springframework.beans.factory不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/PlaceholderHelper.java:[8,48] 程式包org.springframework.beans.factory.config不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/PlaceholderHelper.java:[9,48] 程式包org.springframework.beans.factory.config不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/PlaceholderHelper.java:[10,48] 程式包org.springframework.beans.factory.config不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/PlaceholderHelper.java:[11,48] 程式包org.springframework.beans.factory.config不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/PlaceholderHelper.java:[12,32] 程式包org.springframework.util不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/PlaceholderHelper.java:[32,38] 找不到符號
[ERROR] 符號:   類 ConfigurableBeanFactory
[ERROR] 位置: 類 com.ctrip.framework.apollo.spring.property.PlaceholderHelper
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/PlaceholderHelper.java:[43,47] 找不到符號
[ERROR] 符號:   類 ConfigurableBeanFactory
[ERROR] 位置: 類 com.ctrip.framework.apollo.spring.property.PlaceholderHelper
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/PlaceholderHelper.java:[44,7] 找不到符號
[ERROR] 符號:   類 BeanDefinition
[ERROR] 位置: 類 com.ctrip.framework.apollo.spring.property.PlaceholderHelper
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/ConfigPropertySourcesProcessor.java:[6,33] 程式包org.springframework.beans不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/ConfigPropertySourcesProcessor.java:[7,49] 程式包org.springframework.beans.factory.support不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/ConfigPropertySourcesProcessor.java:[8,49] 程式包org.springframework.beans.factory.support不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/ConfigPropertySourcesProcessor.java:[9,43] 程式包org.springframework.context.support不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/ConfigPropertySourcesProcessor.java:[20,16] 找不到符號
[ERROR] 符號: 類 BeanDefinitionRegistryPostProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/ConfigPropertySourcesProcessor.java:[23,49] 找不到符號
[ERROR] 符號:   類 BeanDefinitionRegistry
[ERROR] 位置: 類 com.ctrip.framework.apollo.spring.config.ConfigPropertySourcesProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/ConfigPropertySourcesProcessor.java:[23,89] 找不到符號
[ERROR] 符號:   類 BeansException
[ERROR] 位置: 類 com.ctrip.framework.apollo.spring.config.ConfigPropertySourcesProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/config/ConfigPropertySourcesProcessor.java:[40,45] 找不到符號
[ERROR] 符號:   類 BeanDefinitionRegistry
[ERROR] 位置: 類 com.ctrip.framework.apollo.spring.config.ConfigPropertySourcesProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloJsonValueProcessor.java:[19,33] 程式包org.springframework.beans不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloJsonValueProcessor.java:[20,41] 程式包org.springframework.beans.factory不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloJsonValueProcessor.java:[21,41] 程式包org.springframework.beans.factory不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloJsonValueProcessor.java:[22,48] 程式包org.springframework.beans.factory.config不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloJsonValueProcessor.java:[23,43] 程式包org.springframework.core.annotation不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloJsonValueProcessor.java:[24,32] 程式包org.springframework.util不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloProcessor.java:[7,33] 程式包org.springframework.beans不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloProcessor.java:[8,48] 程式包org.springframework.beans.factory.config不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloProcessor.java:[9,32] 程式包org.springframework.core不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloProcessor.java:[10,32] 程式包org.springframework.core不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloProcessor.java:[11,32] 程式包org.springframework.util不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloProcessor.java:[16,50] 找不到符號
[ERROR] 符號: 類 BeanPostProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloProcessor.java:[16,69] 找不到符號
[ERROR] 符號: 類 PriorityOrdered
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloJsonValueProcessor.java:[29,74] 找不到符號
[ERROR] 符號: 類 BeanFactoryAware
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloJsonValueProcessor.java:[37,11] 找不到符號
[ERROR] 符號:   類 ConfigurableBeanFactory
[ERROR] 位置: 類 com.ctrip.framework.apollo.spring.annotation.ApolloJsonValueProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloJsonValueProcessor.java:[123,30] 找不到符號
[ERROR] 符號:   類 BeanFactory
[ERROR] 位置: 類 com.ctrip.framework.apollo.spring.annotation.ApolloJsonValueProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloJsonValueProcessor.java:[123,62] 找不到符號
[ERROR] 符號:   類 BeansException
[ERROR] 位置: 類 com.ctrip.framework.apollo.spring.annotation.ApolloJsonValueProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloProcessor.java:[20,14] 找不到符號
[ERROR] 符號:   類 BeansException
[ERROR] 位置: 類 com.ctrip.framework.apollo.spring.annotation.ApolloProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloProcessor.java:[32,85] 找不到符號
[ERROR] 符號:   類 BeansException
[ERROR] 位置: 類 com.ctrip.framework.apollo.spring.annotation.ApolloProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/SpringValueProcessor.java:[21,33] 程式包org.springframework.beans不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/SpringValueProcessor.java:[22,33] 程式包org.springframework.beans不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/SpringValueProcessor.java:[23,52] 程式包org.springframework.beans.factory.annotation不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/SpringValueProcessor.java:[24,48] 程式包org.springframework.beans.factory.config不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/SpringValueProcessor.java:[25,48] 程式包org.springframework.beans.factory.config不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/SpringValueProcessor.java:[26,46] 程式包org.springframework.context.annotation不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/SpringValueProcessor.java:[34,70] 找不到符號
[ERROR] 符號: 類 BeanFactoryPostProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/SpringValueProcessor.java:[52,38] 找不到符號
[ERROR] 符號:   類 ConfigurableListableBeanFactory
[ERROR] 位置: 類 com.ctrip.framework.apollo.spring.annotation.SpringValueProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/SpringValueProcessor.java:[53,14] 找不到符號
[ERROR] 符號:   類 BeansException
[ERROR] 位置: 類 com.ctrip.framework.apollo.spring.annotation.SpringValueProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/SpringValueProcessor.java:[62,14] 找不到符號
[ERROR] 符號:   類 BeansException
[ERROR] 位置: 類 com.ctrip.framework.apollo.spring.annotation.SpringValueProcessor
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/EnableApolloConfig.java:[9,46] 程式包org.springframework.context.annotation不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/EnableApolloConfig.java:[10,32] 程式包org.springframework.core不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/EnableApolloConfig.java:[31,2] 找不到符號
[ERROR] 符號: 類 Import
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/AutoUpdateConfigChangeListener.java:[18,33] 程式包org.springframework.beans不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/AutoUpdateConfigChangeListener.java:[19,48] 程式包org.springframework.beans.factory.config不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/AutoUpdateConfigChangeListener.java:[20,48] 程式包org.springframework.beans.factory.config不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/AutoUpdateConfigChangeListener.java:[21,36] 程式包org.springframework.core.env不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/AutoUpdateConfigChangeListener.java:[22,32] 程式包org.springframework.util不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/AutoUpdateConfigChangeListener.java:[31,17] 找不到符號
[ERROR] 符號:   類 Environment
[ERROR] 位置: 類 com.ctrip.framework.apollo.spring.property.AutoUpdateConfigChangeListener
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/AutoUpdateConfigChangeListener.java:[32,17] 找不到符號
[ERROR] 符號:   類 ConfigurableBeanFactory
[ERROR] 位置: 類 com.ctrip.framework.apollo.spring.property.AutoUpdateConfigChangeListener
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/AutoUpdateConfigChangeListener.java:[33,17] 找不到符號
[ERROR] 符號:   類 TypeConverter
[ERROR] 位置: 類 com.ctrip.framework.apollo.spring.property.AutoUpdateConfigChangeListener
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/AutoUpdateConfigChangeListener.java:[38,41] 找不到符號
[ERROR] 符號:   類 Environment
[ERROR] 位置: 類 com.ctrip.framework.apollo.spring.property.AutoUpdateConfigChangeListener
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/property/AutoUpdateConfigChangeListener.java:[38,66] 找不到符號
[ERROR] 符號:   類 ConfigurableListableBeanFactory
[ERROR] 位置: 類 com.ctrip.framework.apollo.spring.property.AutoUpdateConfigChangeListener
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/util/BeanRegistrationUtil.java:[5,48] 程式包org.springframework.beans.factory.config不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/util/BeanRegistrationUtil.java:[6,49] 程式包org.springframework.beans.factory.support不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/util/BeanRegistrationUtil.java:[7,49] 程式包org.springframework.beans.factory.support不存在
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/util/BeanRegistrationUtil.java:[13,59] 找不到符號
[ERROR] 符號:   類 BeanDefinitionRegistry
[ERROR] 位置: 類 com.ctrip.framework.apollo.spring.util.BeanRegistrationUtil
[ERROR] /E:/Works/105localapollo/apollo-0.10.2/apollo-0.10.2/apollo-client/src/main/java/com/ctrip/framework/apollo/spring/annotation/ApolloConfigRegistrar.java:[4,49] 程式包org.springframework.beans.factory.support不存在
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

解決辦法:

1.先clean project

2.maven update

3.package


再package.


完美解決!

重新整理target.找到apollo-client-0.10.2-jar-with-dependencies.jar 即可

三、引入測試

引入jar包 build path

測試結果:

成功獲取apollo 服務端的值。