Commit 9b1e8af5 authored by 钱坤's avatar 钱坤

改为机构版的配置

parent 7fc5ead1
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
<dependency> <dependency>
<groupId>com.tanpu</groupId> <groupId>com.tanpu</groupId>
<artifactId>common</artifactId> <artifactId>common</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-feo-SNAPSHOT</version>
<exclusions> <exclusions>
<exclusion> <exclusion>
<artifactId>commons-pool2</artifactId> <artifactId>commons-pool2</artifactId>
...@@ -270,7 +270,7 @@ ...@@ -270,7 +270,7 @@
</dependencyManagement> </dependencyManagement>
<build> <build>
<finalName>fund</finalName> <finalName>feo-fund</finalName>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
......
...@@ -14,7 +14,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2; ...@@ -14,7 +14,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
import static com.google.common.collect.Lists.newArrayList; import static com.google.common.collect.Lists.newArrayList;
import static com.google.common.collect.Sets.newHashSet; import static com.google.common.collect.Sets.newHashSet;
@Profile("dev") @Profile({"dev","test"})
@Configuration @Configuration
@EnableSwagger2 @EnableSwagger2
public class Swagger2Config { public class Swagger2Config {
......
...@@ -6,6 +6,7 @@ import com.ctrip.framework.apollo.spring.annotation.ApolloConfig; ...@@ -6,6 +6,7 @@ import com.ctrip.framework.apollo.spring.annotation.ApolloConfig;
import com.ctrip.framework.apollo.spring.annotation.ApolloConfigChangeListener; import com.ctrip.framework.apollo.spring.annotation.ApolloConfigChangeListener;
import com.ctrip.framework.apollo.spring.boot.ApolloAutoConfiguration; import com.ctrip.framework.apollo.spring.boot.ApolloAutoConfiguration;
import com.ctrip.framework.apollo.spring.config.PropertySourcesConstants; import com.ctrip.framework.apollo.spring.config.PropertySourcesConstants;
import com.tanpu.common.enums.Constant;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeansException; import org.springframework.beans.BeansException;
import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.boot.autoconfigure.AutoConfigureAfter;
...@@ -36,7 +37,7 @@ public class ApolloRefresherConfiguration implements ApplicationContextAware { ...@@ -36,7 +37,7 @@ public class ApolloRefresherConfiguration implements ApplicationContextAware {
} }
// 刷新参数(刷新"common"和"application"空间中,"logging.level."或"aniu."开头的配置 ) // 刷新参数(刷新"common"和"application"空间中,"logging.level."或"aniu."开头的配置 )
@ApolloConfigChangeListener(value = { "common", "application" }, interestedKeyPrefixes = { "logging.level.", @ApolloConfigChangeListener(value = {Constant.APOLLO_COMMON_APP_ID, "application" }, interestedKeyPrefixes = { "logging.level.",
"tanpu." }) "tanpu." })
public void onChangeLogLevel(ConfigChangeEvent changeEvent) { public void onChangeLogLevel(ConfigChangeEvent changeEvent) {
log.info("Refreshing logging levels and tanpu."); log.info("Refreshing logging levels and tanpu.");
......
...@@ -4,7 +4,7 @@ apollo.bootstrap.enabled=true ...@@ -4,7 +4,7 @@ apollo.bootstrap.enabled=true
##关闭placeholder在运行时自动更新功能 ##关闭placeholder在运行时自动更新功能
##apollo.autoUpdateInjectedSpringProperties=false ##apollo.autoUpdateInjectedSpringProperties=false
#appid #appid
app.id=tanpu-fund app.id=feo-fund
#配置中心地址 #配置中心地址
apollo.meta=http://apollo.caixiaoquan.com:8080 apollo.meta=http://apollo.caixiaoquan.com:8080
#配置中心缓存路径 #配置中心缓存路径
...@@ -12,5 +12,5 @@ apollo.cacheDir=./apollocache/ ...@@ -12,5 +12,5 @@ apollo.cacheDir=./apollocache/
#监听namespaces #监听namespaces
#common公共空间 #common公共空间
#application业务系统自身空间 #application业务系统自身空间
apollo.bootstrap.namespaces=application,common apollo.bootstrap.namespaces=application,feo-common
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment