본문 바로가기
MySql

MySQL Spring Boot Actuator MySQL 데이터베이스 상태 확인

by 베이스 공부 2020. 11. 1.
반응형

MySQL 데이터베이스를 사용하여 하나의 데모 스프링 부트 애플리케이션 CRUD 작업을 설계했습니다. 내 application.properties 파일은 다음과 같습니다.

spring.boot.admin.url=http://localhost:8081
spring.datasource.url= jdbc:mysql://localhost:3306/springbootdb
spring.datasource.username=root
spring.datasource.password=admin
endpoints.health.sensitive=false
management.health.db.enabled=true
management.health.defaults.enabled=true
management.health.diskspace.enabled=true
spring.jpa.hibernate.ddl-auto=create-drop

스프링 액추에이터의 POM.xml은 다음과 같습니다.

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
    <groupId>de.codecentric</groupId>
    <artifactId>spring-boot-admin-starter-client</artifactId>
    <version>1.3.4</version>
</dependency>


누구든지 도와 주시겠습니까?

 

해결 방법

 


이것이 원하는 것이 아니라면 보안을 완전히 제어하고 Spring Security를 ​​사용하여 자신의 규칙을 작성할 수 있습니다.

 

참조 페이지 https://stackoverflow.com/questions/39631355

 

 

반응형

댓글