[Spring Boot Actuator 추가] build.gradle에 Spring Boot Actuator 의존성 추가 및 README.md에 시스템 모니터링 관련 문서화. application.properties에 Actuator 설정 추가.
This commit is contained in:
		
							
								
								
									
										25
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								README.md
									
									
									
									
									
								
							@@ -163,6 +163,21 @@ public enum ApiResponseCode {
 | 
			
		||||
- **URL**: `http://localhost:8080/service/swagger-ui.html`
 | 
			
		||||
- **API Docs**: `http://localhost:8080/service/api-docs`
 | 
			
		||||
 | 
			
		||||
### 5. 시스템 모니터링 (Actuator)
 | 
			
		||||
 | 
			
		||||
#### Health 체크
 | 
			
		||||
 | 
			
		||||
- **기본 Health**: `http://localhost:8080/service/actuator/health`
 | 
			
		||||
- **Readiness Probe**: `http://localhost:8080/service/actuator/health/readiness`
 | 
			
		||||
- **Liveness Probe**: `http://localhost:8080/service/actuator/health/liveness`
 | 
			
		||||
 | 
			
		||||
#### 시스템 정보
 | 
			
		||||
 | 
			
		||||
- **애플리케이션 정보**: `http://localhost:8080/service/actuator/info`
 | 
			
		||||
- **환경 설정**: `http://localhost:8080/service/actuator/env`
 | 
			
		||||
- **설정 속성**: `http://localhost:8080/service/actuator/configprops`
 | 
			
		||||
- **메트릭**: `http://localhost:8080/service/actuator/metrics`
 | 
			
		||||
 | 
			
		||||
#### 주요 어노테이션
 | 
			
		||||
 | 
			
		||||
```java
 | 
			
		||||
@@ -182,7 +197,7 @@ public enum ApiResponseCode {
 | 
			
		||||
- **SwaggerConfig.java**: OpenAPI 기본 정보 설정
 | 
			
		||||
- **application.properties**: Swagger UI 커스터마이징
 | 
			
		||||
 | 
			
		||||
### 5. 트랜잭션 관리
 | 
			
		||||
### 6. 트랜잭션 관리
 | 
			
		||||
 | 
			
		||||
#### 기본 설정
 | 
			
		||||
 | 
			
		||||
@@ -206,7 +221,7 @@ public class MemberServiceImpl {
 | 
			
		||||
- **메서드별**: 데이터 수정 시에만 `@Transactional` 개별 적용
 | 
			
		||||
- **설정**: `spring.jpa.open-in-view=false` (성능 최적화)
 | 
			
		||||
 | 
			
		||||
### 6. 오류 등록 및 사용
 | 
			
		||||
### 7. 오류 등록 및 사용
 | 
			
		||||
 | 
			
		||||
#### 오류 코드 등록
 | 
			
		||||
 | 
			
		||||
@@ -233,7 +248,7 @@ throw new ApiException(ApiResponseCode.USER_ID_DUPLICATE);
 | 
			
		||||
- **예외 클래스**: `ApiException`으로 비즈니스 로직 예외 처리
 | 
			
		||||
- **자동 처리**: `GlobalExceptionHandler`가 일관된 응답 형태로 변환
 | 
			
		||||
 | 
			
		||||
### 7. 로깅 시스템
 | 
			
		||||
### 8. 로깅 시스템
 | 
			
		||||
 | 
			
		||||
#### @LogExecution 어노테이션 사용법
 | 
			
		||||
 | 
			
		||||
@@ -287,7 +302,7 @@ public OrderDto processOrder() { }
 | 
			
		||||
 | 
			
		||||
**중요**: `@LogExecution` 어노테이션이 없으면 메서드 실행 로그가 출력되지 않습니다
 | 
			
		||||
 | 
			
		||||
### 8. MapStruct
 | 
			
		||||
### 9. MapStruct
 | 
			
		||||
 | 
			
		||||
**매퍼 인터페이스**
 | 
			
		||||
 | 
			
		||||
@@ -311,7 +326,7 @@ Member entity = memberMapper.toEntity(dto);
 | 
			
		||||
 | 
			
		||||
**자동 생성**: 컴파일 시 `MemberMapperImpl` 구현체 생성
 | 
			
		||||
 | 
			
		||||
### 9. BaseEntity 상속
 | 
			
		||||
### 10. BaseEntity 상속
 | 
			
		||||
 | 
			
		||||
**모든 엔티티는 `BaseEntity` 상속을 원칙으로 합니다.**
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -38,6 +38,9 @@ dependencies {
 | 
			
		||||
	// Validation
 | 
			
		||||
	implementation 'org.springframework.boot:spring-boot-starter-validation'
 | 
			
		||||
	
 | 
			
		||||
	// Spring Boot Actuator
 | 
			
		||||
	implementation 'org.springframework.boot:spring-boot-starter-actuator'
 | 
			
		||||
	
 | 
			
		||||
	// MapStruct
 | 
			
		||||
	implementation 'org.mapstruct:mapstruct:1.5.5.Final'
 | 
			
		||||
	annotationProcessor 'org.mapstruct:mapstruct-processor:1.5.5.Final'
 | 
			
		||||
 
 | 
			
		||||
@@ -114,7 +114,7 @@ springdoc.default-consumes-media-type=application/json
 | 
			
		||||
# ========================================
 | 
			
		||||
# 보안 설정 - 허용할 경로
 | 
			
		||||
# ========================================
 | 
			
		||||
security.permit-all-paths=/login,/members/register,/swagger-ui/**,/swagger-ui.html,/swagger-ui/index.html,/api-docs,/api-docs/**,/v3/api-docs,/v3/api-docs/**,/ws/**
 | 
			
		||||
security.permit-all-paths=/login,/members/register,/swagger-ui/**,/swagger-ui.html,/swagger-ui/index.html,/api-docs,/api-docs/**,/v3/api-docs,/v3/api-docs/**,/ws/**,/actuator/**,/actuator/health/**,/actuator/info
 | 
			
		||||
 | 
			
		||||
# 파일 업로드 설정
 | 
			
		||||
# ========================================
 | 
			
		||||
@@ -125,3 +125,35 @@ spring.servlet.multipart.file-size-threshold=2KB
 | 
			
		||||
 | 
			
		||||
# 파일 저장 경로 설정
 | 
			
		||||
app.file.upload.path=./uploads/
 | 
			
		||||
 | 
			
		||||
# ========================================
 | 
			
		||||
# Spring Boot Actuator 설정
 | 
			
		||||
# ========================================
 | 
			
		||||
# Actuator 엔드포인트 활성화
 | 
			
		||||
management.endpoints.web.exposure.include=health,info,metrics,env,configprops
 | 
			
		||||
management.endpoint.health.show-details=always
 | 
			
		||||
management.endpoint.health.show-components=always
 | 
			
		||||
 | 
			
		||||
# Health 체크 상세 정보 표시
 | 
			
		||||
management.health.db.enabled=true
 | 
			
		||||
management.health.diskspace.enabled=true
 | 
			
		||||
management.health.defaults.enabled=true
 | 
			
		||||
 | 
			
		||||
# Actuator 기본 경로 설정
 | 
			
		||||
management.endpoints.web.base-path=/actuator
 | 
			
		||||
 | 
			
		||||
# Health 체크 타임아웃 설정 (밀리초)
 | 
			
		||||
management.health.defaults.timeout=10s
 | 
			
		||||
 | 
			
		||||
# 커스텀 Health 체크 그룹 설정
 | 
			
		||||
management.health.groups.readiness.include=db,diskSpace
 | 
			
		||||
management.health.groups.liveness.include=ping
 | 
			
		||||
 | 
			
		||||
# ========================================
 | 
			
		||||
# 애플리케이션 정보 설정 (Actuator info 엔드포인트용)
 | 
			
		||||
# ========================================
 | 
			
		||||
info.app.name=Bio Backend Service
 | 
			
		||||
info.app.description=생물학 연구를 위한 백엔드 서비스
 | 
			
		||||
info.app.version=@project.version@
 | 
			
		||||
info.app.java.version=@java.version@
 | 
			
		||||
info.app.spring-boot.version=@spring-boot.version@
 | 
			
		||||
		Reference in New Issue
	
	Block a user