Windows环境安装下载,参考:https://github.com/ctripcorp/apollo
项目引用
<dependency>
<groupId>com.ctrip.framework.apollo</groupId>
<artifactId>apollo-client</artifactId>
<version>1.4.0</version>
</dependency>
引入jar包后,项目配置
1.入口方法加入注解配置
@EnableApolloConfig
package top.xzhand;
import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
@EnableApolloConfig
@MapperScan("top.xzhand.mapp