From 0a8808b418e854694d2f0d5261ec88f41917c794 Mon Sep 17 00:00:00 2001
From: xiongxiaoyang <773861846@qq.com>
Date: Mon, 6 Jun 2022 21:43:31 +0800
Subject: [PATCH] =?UTF-8?q?build:=20=E9=9B=86=E6=88=90=20Spring=20Boot=20A?=
=?UTF-8?q?dmin=EF=BC=8C=E5=AE=9E=E7=8E=B0=E5=BA=94=E7=94=A8=E7=AE=A1?=
=?UTF-8?q?=E7=90=86=E5=92=8C=E7=9B=91=E6=8E=A7=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pom.xml | 22 ++++++++++++++
src/main/resources/application.yml | 42 ++++++++++++++++++++++++++-
src/main/resources/logback-spring.xml | 4 +--
3 files changed, 65 insertions(+), 3 deletions(-)
diff --git a/pom.xml b/pom.xml
index 552c38f..c3ca758 100644
--- a/pom.xml
+++ b/pom.xml
@@ -145,6 +145,17 @@
${shardingsphere-jdbc.version}
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+ de.codecentric
+ spring-boot-admin-starter-client
+ 3.0.0-M1
+
+
mysql
mysql-connector-java
@@ -200,6 +211,17 @@
false
+
+ sonatype-nexus-snapshots
+ Sonatype Nexus Snapshots
+ https://oss.sonatype.org/content/repositories/snapshots/
+
+ true
+
+
+ false
+
+
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index fa82642..5b97094 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -1,7 +1,6 @@
spring:
profiles:
active: dev
-
# 将所有数字转为 String 类型返回,避免前端数据精度丢失的问题
jackson:
generator:
@@ -10,6 +9,8 @@ spring:
# 上传文件最大大小
multipart:
max-file-size: 5MB
+ application:
+ name: novel
server:
port: 8888
@@ -129,6 +130,45 @@ xxl:
accessToken: 123
+---
+spring:
+ config:
+ activate:
+ on-profile: dev
+# Spring Boot 应用管理和监控
+ boot:
+ admin:
+ client:
+ # 是否开启 Spring Boot Admin 客户端
+ enabled: false
+ # Spring Boot Admin 服务端注册地址
+ url: http://localhost:8080
+ # Spring Boot Admin 服务端认证用户名
+ username: novel
+ # Spring Boot Admin 服务端认证密码
+ password: novel
+
+
+management:
+ endpoints:
+ web:
+ exposure:
+ include: "*"
+ endpoint:
+ logfile:
+ enabled: true
+ external-file: logs/novel.log
+
+ info:
+ env:
+ enabled: true
+ health:
+ rabbit:
+ enabled: false
+ elasticsearch:
+ enabled: false
+
+
---
spring:
config:
diff --git a/src/main/resources/logback-spring.xml b/src/main/resources/logback-spring.xml
index 40569f6..a7883d6 100644
--- a/src/main/resources/logback-spring.xml
+++ b/src/main/resources/logback-spring.xml
@@ -53,26 +53,26 @@
+
+
-
-