Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit360db94

Browse files
authored
Merge pull requestlowcoder-org#911 from lowcoder-org/backend_fixes
Backend fixes - Refinement of Health Checks and standard Returns
2 parents18ca20c +438d75a commit360db94

File tree

3 files changed

+42
-2
lines changed

3 files changed

+42
-2
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
packageorg.lowcoder.api.framework;
2+
3+
importlombok.RequiredArgsConstructor;
4+
importorg.lowcoder.api.framework.view.ResponseView;
5+
importorg.springframework.http.MediaType;
6+
importorg.springframework.web.bind.annotation.GetMapping;
7+
importorg.springframework.web.bind.annotation.RestController;
8+
importreactor.core.publisher.Mono;
9+
10+
@RequiredArgsConstructor
11+
@RestController
12+
publicclassIndexController {
13+
14+
@GetMapping(value ="/",consumes = {MediaType.ALL_VALUE})
15+
publicMono<ResponseView<Void>>index() {
16+
returnMono.just(ResponseView.error(ResponseView.SUCCESS,"Lowcoder API is up and runnig"));
17+
}
18+
}

‎server/api-service/lowcoder-server/src/main/java/org/lowcoder/api/framework/security/SecurityConfig.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http) {
120120
ServerWebExchangeMatchers.pathMatchers(HttpMethod.GET,NewUrl.CONFIG_URL),
121121
ServerWebExchangeMatchers.pathMatchers(HttpMethod.GET,NewUrl.CONFIG_URL +"/deploymentId"),
122122
ServerWebExchangeMatchers.pathMatchers(HttpMethod.HEAD,NewUrl.STATE_URL +"/healthCheck"),
123+
ServerWebExchangeMatchers.pathMatchers(HttpMethod.GET,NewUrl.PREFIX +"/status/**"),
123124
ServerWebExchangeMatchers.pathMatchers(HttpMethod.GET,NewUrl.APPLICATION_URL +"/*/view"),
124125
ServerWebExchangeMatchers.pathMatchers(HttpMethod.GET,NewUrl.APPLICATION_URL +"/*/view_marketplace"),
125126
ServerWebExchangeMatchers.pathMatchers(HttpMethod.GET,NewUrl.APPLICATION_URL +"/marketplace-apps"),// marketplace apps

‎server/api-service/lowcoder-server/src/main/resources/application.yaml‎

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ common:
7979
plugin-dirs:
8080
-${LOWCODER_PLUGINS_DIR:../plugins}
8181
super-admin:
82-
username:${LOWCODER_SUPERUSER_USERNAME:test@lowcoder.org}
82+
username:${LOWCODER_SUPERUSER_USERNAME:admin@localhost}
8383
password:${LOWCODER_SUPERUSER_PASSWORD:}
8484
marketplace:
8585
private-mode:${LOWCODER_MARKETPLACE_PRIVATE_MODE:true}
@@ -98,6 +98,27 @@ springdoc:
9898
paths-to-exclude:/api/v1/**
9999

100100
management:
101+
endpoints:
102+
enabled-by-default:false
103+
web:
104+
base-path:"/api/status"
105+
exposure:
106+
include:"health,metrics,prometheus"
107+
endpoint:
108+
health:
109+
show-details:never
110+
show-components:always
111+
enabled:true
112+
metrics:
113+
enabled:true
114+
prometheus:
115+
enabled:true
101116
health:
102117
mail:
103-
enabled:false
118+
enabled:false
119+
db:
120+
enabled:true
121+
redis:
122+
enabled:true
123+
diskspace:
124+
enabled:false

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp