SpringBoot external configuration of the Apollo project

SpringBoot external configuration

SpringBoot benefits of external configuration is too much in the direction docker direction one step closer to it

SpringCloud recently started using this micro-services framework to do the development, configuration management of each micro-services is a problem.
After all, it is a new project, SpringCloud with the next, feeling very uncomfortable, but also to achieve the configuration to refresh is not easy, and perhaps unfamiliar to SpringCloud use it
and then look at the configuration center used by several large companies, compared final choice next the Apollo, demo the next test, easy, on it.

I use in the project is to: create app.properties file resource / META-INF directory
1. Configure app.properteis
app.id=xxx
2.apollo connection configuration in a position:
private static final String SERVER_PROPERTIES_LINUX = "/opt/settings/server.properties";
private static final String SERVER_PROPERTIES_WINDOWS = "C:/opt/settings/server.properties";
This configuration is defined in the com.ctrip.framework.foundation.internals.provider.DefaultServerProvider
Configuration files server.properties
env=DEV
apollo.meta=http://192.168.1.x:8080
apollo.cacheDir=/opt/apollo/cache/config
4. Start Services

Front building apollo omitted process of
building apollo quite smoothly
is to download apollo package very slow, very slow, very slow speed I may be the problem it
just three packages
apollo-configservice-1.4.0-github.zip
apollo-adminservice- 1.4.0-github.zip
apollo-portal-1.4.0-github.zip
in order to start, the best time to start facie log.
I can refer to this Blog Apollo to build a distribution center

Guess you like

Origin www.cnblogs.com/mengjianzhou/p/11220273.html
Recommended