4 changed files with 73 additions and 1 deletions
@ -0,0 +1,34 @@ |
|||||
|
# Tomcat |
||||
|
server: |
||||
|
port: 8990 |
||||
|
|
||||
|
# Spring |
||||
|
spring: |
||||
|
application: |
||||
|
# 应用名称 |
||||
|
name: business |
||||
|
profiles: |
||||
|
# 环境配置 |
||||
|
active: @profiles.active@ |
||||
|
|
||||
|
--- # nacos 配置 |
||||
|
spring: |
||||
|
cloud: |
||||
|
nacos: |
||||
|
# nacos 服务地址 |
||||
|
server-addr: @nacos.server@ |
||||
|
username: @nacos.username@ |
||||
|
password: @nacos.password@ |
||||
|
discovery: |
||||
|
# 注册组 |
||||
|
group: @nacos.discovery.group@ |
||||
|
namespace: ${spring.profiles.active} |
||||
|
config: |
||||
|
# 配置组 |
||||
|
group: @nacos.config.group@ |
||||
|
namespace: ${spring.profiles.active} |
||||
|
config: |
||||
|
import: |
||||
|
- optional:nacos:application-common.yml |
||||
|
- optional:nacos:datasource.yml |
||||
|
# - optional:nacos:${spring.application.name}.yml |
@ -0,0 +1,10 @@ |
|||||
|
Spring Boot Version: ${spring-boot.version} |
||||
|
Spring Application Name: ${spring.application.name} |
||||
|
_ _ |
||||
|
(_) | | |
||||
|
_ __ _ _ ___ _ _ _ ______ ___ _ _ ___ | |_ ___ _ __ ___ |
||||
|
| '__|| | | | / _ \ | | | || ||______|/ __|| | | |/ __|| __| / _ \| '_ ` _ \ |
||||
|
| | | |_| || (_) || |_| || | \__ \| |_| |\__ \| |_ | __/| | | | | | |
||||
|
|_| \__,_| \___/ \__, ||_| |___/ \__, ||___/ \__| \___||_| |_| |_| |
||||
|
__/ | __/ | |
||||
|
|___/ |___/ |
@ -0,0 +1,28 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<configuration scan="true" scanPeriod="60 seconds" debug="false"> |
||||
|
<!-- 日志存放路径 --> |
||||
|
<property name="log.path" value="logs/${project.artifactId}" /> |
||||
|
<!-- 日志输出格式 --> |
||||
|
<property name="console.log.pattern" |
||||
|
value="%red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{36}%n) - %msg%n"/> |
||||
|
|
||||
|
<!-- 控制台输出 --> |
||||
|
<appender name="console" class="ch.qos.logback.core.ConsoleAppender"> |
||||
|
<encoder> |
||||
|
<pattern>${console.log.pattern}</pattern> |
||||
|
<charset>utf-8</charset> |
||||
|
</encoder> |
||||
|
</appender> |
||||
|
|
||||
|
<include resource="logback-common.xml" /> |
||||
|
|
||||
|
<include resource="logback-logstash.xml" /> |
||||
|
|
||||
|
<!-- 开启 skywalking 日志收集 --> |
||||
|
<include resource="logback-skylog.xml" /> |
||||
|
|
||||
|
<!--系统操作日志--> |
||||
|
<root level="info"> |
||||
|
<appender-ref ref="console" /> |
||||
|
</root> |
||||
|
</configuration> |
Loading…
Reference in new issue