Initial commit
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package org.egovframe.cloud.config;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.cloud.config.server.EnableConfigServer;
|
||||
|
||||
@EnableConfigServer
|
||||
@SpringBootApplication
|
||||
public class ConfigApplication {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(ConfigApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
25
backend/config/src/main/resources/application.yml
Normal file
25
backend/config/src/main/resources/application.yml
Normal file
@@ -0,0 +1,25 @@
|
||||
server:
|
||||
port: 8888
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: config-service
|
||||
profiles:
|
||||
active: native # native file repository
|
||||
cloud:
|
||||
config:
|
||||
server:
|
||||
native:
|
||||
search-locations: file://${user.home}/workspace/egovframe-msa-edu/config
|
||||
rabbitmq:
|
||||
host: localhost
|
||||
port: 5672
|
||||
username: guest
|
||||
password: guest
|
||||
|
||||
# config server actuator
|
||||
management:
|
||||
endpoints:
|
||||
web:
|
||||
exposure:
|
||||
include: busrefresh
|
||||
35
backend/config/src/main/resources/logback-spring.xml
Normal file
35
backend/config/src/main/resources/logback-spring.xml
Normal file
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %thread %-5level %logger - %m%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 로컬에서는 로그를 전송하지 않도록 설정 -->
|
||||
<springProfile name="default">
|
||||
<root level="INFO">
|
||||
<appender-ref ref="STDOUT" />
|
||||
</root>
|
||||
</springProfile>
|
||||
<springProfile name="!default">
|
||||
<!-- java -Ddestination="localhost:8088" 와 같이 변경할 수 있다. cf 환경에서는 manifest.yml 파일에 환경변수로 추가 -->
|
||||
<property name="destination" value="localhost:8088" />
|
||||
<property name="app_name" value="${app_name}" />
|
||||
|
||||
<!-- ELK - Logstash 로 로그를 전송하기 위한 appender -->
|
||||
<appender name="LOGSTASH" class="net.logstash.logback.appender.LogstashTcpSocketAppender">
|
||||
<destination>${destination}</destination><!-- native profile => localhost:8088 -->
|
||||
<encoder class="net.logstash.logback.encoder.LogstashEncoder">
|
||||
<customFields>{"app.name":"${app_name}"}</customFields>
|
||||
</encoder>
|
||||
</appender>
|
||||
<root level="WARN">
|
||||
<appender-ref ref="LOGSTASH" />
|
||||
<appender-ref ref="STDOUT" />
|
||||
</root>
|
||||
</springProfile>
|
||||
|
||||
<typeAliases></typeAliases>
|
||||
</configuration>
|
||||
Reference in New Issue
Block a user