Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
basic-api-boot
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-api-boot
Commits
301d6f42
提交
301d6f42
authored
10月 16, 2024
作者:
方治民
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: 移除 Spring Boot Admin Client 依赖及相关配置,防止意外的配置可能暴露环境变量、配置信息等信息的情况
上级
e4c817a5
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
0 行增加
和
76 行删除
+0
-76
build.gradle
app/build.gradle
+0
-2
ActuatorConfiguration.java
...ain/java/com/yiring/app/config/ActuatorConfiguration.java
+0
-27
GlobalExceptionHandler.java
...in/java/com/yiring/app/config/GlobalExceptionHandler.java
+0
-5
application-monitor.yml
app/src/main/resources/application-monitor.yml
+0
-42
没有找到文件。
app/build.gradle
浏览文件 @
301d6f42
...
...
@@ -23,8 +23,6 @@ dependencies {
implementation
'org.springframework.boot:spring-boot-starter-data-jpa'
implementation
'org.springframework.boot:spring-boot-starter-validation'
// Spring Boot Admin Client
implementation
'de.codecentric:spring-boot-admin-starter-client'
// Sentry
implementation
"io.sentry:sentry-spring-boot-starter-jakarta"
...
...
app/src/main/java/com/yiring/app/config/ActuatorConfiguration.java
deleted
100644 → 0
浏览文件 @
e4c817a5
/* (C) 2024 YiRing, Inc. */
package
com
.
yiring
.
app
.
config
;
import
org.springframework.boot.actuate.audit.InMemoryAuditEventRepository
;
import
org.springframework.boot.actuate.web.exchanges.HttpExchangeRepository
;
import
org.springframework.boot.actuate.web.exchanges.InMemoryHttpExchangeRepository
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
/**
* @author Jim
*/
@Configuration
public
class
ActuatorConfiguration
{
@Bean
public
HttpExchangeRepository
httpExchangeRepository
()
{
InMemoryHttpExchangeRepository
repository
=
new
InMemoryHttpExchangeRepository
();
repository
.
setCapacity
(
100
);
return
repository
;
}
@Bean
public
InMemoryAuditEventRepository
repository
()
{
return
new
InMemoryAuditEventRepository
();
}
}
app/src/main/java/com/yiring/app/config/GlobalExceptionHandler.java
浏览文件 @
301d6f42
/* (C) 2021 YiRing, Inc. */
package
com
.
yiring
.
app
.
config
;
import
com.yiring.common.core.I18n
;
import
com.yiring.common.core.Result
;
import
com.yiring.common.core.Status
;
import
io.sentry.Sentry
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.core.annotation.Order
;
import
org.springframework.http.HttpStatus
;
...
...
@@ -22,11 +20,8 @@ import org.springframework.web.bind.annotation.RestControllerAdvice;
@Slf4j
@Order
@RestControllerAdvice
@RequiredArgsConstructor
public
class
GlobalExceptionHandler
{
final
I18n
i18n
;
/**
* 其他异常
*
...
...
app/src/main/resources/application-monitor.yml
浏览文件 @
301d6f42
...
...
@@ -10,48 +10,6 @@ sentry:
traces-sample-rate
:
1.0
debug
:
false
# Spring Boot Admin Client Config
spring
:
boot
:
admin
:
client
:
# url: http://127.0.0.1:18891
url
:
https://sbas.yiring.com
username
:
admin
password
:
sba.developer@Yiring.com
instance
:
# TODO: 替换成正式项目的 Spring Boot Admin Server URL
management-base-url
:
http://39.100.252.176:42100/api
# Spring Boot Actuator
management
:
endpoints
:
web
:
exposure
:
include
:
"
*"
endpoint
:
health
:
show-details
:
always
mappings
:
enabled
:
false
shutdown
:
enabled
:
false
startup
:
enabled
:
false
heapdump
:
enabled
:
false
info
:
build
:
enabled
:
true
git
:
enabled
:
true
env
:
enabled
:
false
java
:
enabled
:
true
os
:
enabled
:
true
# Uptime Kuma 服务地址
uptime
:
domain
:
https://uptime.yiring.com
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论