728x90
1. 라이브러리 가져오기
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
2. application.properties에 보고 싶은 server 내용 넣기
management.endpoints.web.exposure.include=health,metrix
#혹은 전부 보고싶을 때는 아래 처럼 설정
#management.endpoints.web.exposure.include=*
3. 접속해서 확인하기
기본은 주소는
http://도메인/actuator
만약 configProps에 대해 보고싶다면
http://도메인/actuator/configProps
서버 요청에 대한 서버 값을 보고싶다면
http://localhost:8080/actuator/metrics/http.server.requests
'서버' 카테고리의 다른 글
Spring boot 3 - Thymeleaf 핫리로드까지는 아니지만 리로드시 적용시키기 (0) | 2024.11.27 |
---|---|
Spring boot3 - h2 설정해서 쓰기, 스키마 쿼리 셋팅 후 datasource를 이용해 미리 h2에 테이블 생성하기 (0) | 2024.11.26 |
Spring boot3 - maven으로 빌드, 내장 tomcat은 어디있는지 확인하기 (0) | 2024.11.26 |
Spring boot3 - properties에 있는 환경변수를 bean으로 등록해 사용해보기 (1) | 2024.11.25 |
Spring boot 3 - application.properties dev,prod,default 설정 (0) | 2024.11.25 |