generated from gc/template-java-maven
백엔드:
- 테넌트 CRUD API (GET/POST/PUT /api/tenants)
- 사용자 CRUD API (GET/POST/PUT/DELETE /api/users, 역할 기반 접근 제어)
- 서비스 등록/관리 API (GET/POST/PUT /api/services, /api/services/{id}/apis)
- 하트비트 스케줄러 (30초 간격 폴링, WebClient 헬스체크)
- 헬스체크 상태 조회/이력 API (GET/POST /api/heartbeat)
- @EnableMethodSecurity + @PreAuthorize 역할 기반 접근 제어
- WebClientConfig, ErrorCode 7개 추가
프론트엔드:
- 테넌트 관리 페이지 (CRUD 테이블 + 모달)
- 사용자 관리 페이지 (역할 드롭다운, 테넌트 선택)
- 서비스 관리 페이지 (헬스 배지, API 목록 탭)
- API 서비스 모듈 4개 (tenant, user, service, heartbeat)
Closes #7
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
27 lines
854 B
Java
27 lines
854 B
Java
package com.gcsc.connection.config;
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
import org.springframework.context.annotation.Bean;
|
|
import org.springframework.context.annotation.Configuration;
|
|
import org.springframework.http.client.reactive.ReactorClientHttpConnector;
|
|
import org.springframework.web.reactive.function.client.WebClient;
|
|
import reactor.netty.http.client.HttpClient;
|
|
|
|
import java.time.Duration;
|
|
|
|
@Configuration
|
|
public class WebClientConfig {
|
|
|
|
@Value("${app.heartbeat.timeout-seconds}")
|
|
private int timeoutSeconds;
|
|
|
|
@Bean
|
|
public WebClient webClient() {
|
|
HttpClient httpClient = HttpClient.create()
|
|
.responseTimeout(Duration.ofSeconds(timeoutSeconds));
|
|
return WebClient.builder()
|
|
.clientConnector(new ReactorClientHttpConnector(httpClient))
|
|
.build();
|
|
}
|
|
}
|