添加apollo

This commit is contained in:
付庆吉
2021-05-25 15:52:20 +08:00
parent 6718acb3c5
commit 8c3114cca7
19 changed files with 320 additions and 70 deletions

View File

@ -1,5 +1,6 @@
package com.chinaunicom.mall.ebtp.extend;
import com.ctrip.framework.apollo.spring.annotation.EnableApolloConfig;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
@ -23,6 +24,7 @@ import io.micrometer.core.instrument.MeterRegistry;
@EnableEurekaClient
@MapperScan({ "com.chinaunicom.mall.ebtp.extend.**.dao" })
@ComponentScan("com.chinaunicom.mall.ebtp.*")
@EnableApolloConfig
public class BizServiceEbtpExtendApplication {
public static void main(String[] args) {

View File

@ -1,3 +1,9 @@
spring:
profiles:
active: uat
# 对应 apollo 配置中心的应用名
app:
id: biz-service-ebtp-extend
# Apollo 配置信息
apollo:
bootstrap:
enabled: true
namespace: application

View File

@ -2,7 +2,7 @@
<configuration scan="true" scanPeriod="60 seconds" debug="true">
<property name="logback.logdir" value="/log" />
<property name="logback.appname" value="biz_service_ebtp_extend" />
<property name="logback.appname" value="${APP_NAME}" />
<contextName>${logback.appname}</contextName>