728x90
반응형
Spring-Boot-Admin
스프링 진영이 제공하는게 아닌 제 3자가 제공하는 Application이다. 설정한 Actuator정보를 UI에서 확인할 수 있는 간단한 Tool/Application이다.
참고
https://github.com/codecentric/spring-boot-admin
codecentric/spring-boot-admin
Admin UI for administration of spring boot applications - codecentric/spring-boot-admin
github.com
예제
1. Admin Server
(1) 의존성 추가
// pom.xml <dependency> <groupId>de.codecentric</groupId> <artifactId>spring-boot-admin-starter-server</artifactId> <version>2.0.1</version> </dependency>
(2) @EnableAdminServer
Application 클래스에 추가
// Application.java @SpringBootApplication @EnableAdminServer // Admin Server public class Application { public static void main(String[] args) { SpringApplication.run(Application.class, args); } }
2. Client
(1) 의존성 추가
// pom.xml <dependency> <groupId>de.codecentric</groupId> <artifactId>spring-boot-admin-starter-client</artifactId> <version>2.0.1</version> </dependency>
(2) application.properties
수정
// application.properties // Admin Server Url 지정 spring.boot.admin.client.url=http://localhost:8080 // Endpoint 전부 출력 management.endpoints.web.exposure.include=* // Admin Server Port : 8080 이기 때문에 Client Server Port 변경 server.port=18080
동작 확인
Admin Server (http://localhost:8080/
) 및 Client (http://localhost:18080/
)

* Application 클릭 시 다양한 정보 확인 가능








다양한 정보를 볼 수 있기 때문에 스프링 시큐리티 통해 Admin만 접근 가능하게 해야 보안 문제가 없다.
728x90
반응형
'Dev > Spring Boot' 카테고리의 다른 글
[스프링 부트 개념과 활용] 스프링 부트 Actuator 2부 (0) | 2020.09.03 |
---|---|
[스프링 부트 개념과 활용] 스프링 부트 Actuator 1부 (0) | 2020.09.03 |
[스프링 부트 개념과 활용] 그 밖에 다양한 기술 연동 (0) | 2020.09.03 |
[스프링 부트 개념과 활용] 스프링 REST 클라이언트 2부 (0) | 2020.09.03 |
[스프링 부트 개념과 활용] 스프링 REST 클라이언트 1부 (0) | 2020.09.03 |
댓글