MySQLデータベースでデモ・スプリング・ブート・アプリケーションCRUD操作を設計しました。私のapplication.propertiesファイルは次のとおりです。スプリング・ブート・アクチュエータMySQLデータベース・ヘルスチェック
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は次のとおりです。応答として:{ "UP" "状態を"}
<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>
私はURLをヒットしようとする "http://localhost:8080/healthは"、私は取得しています。私はスプリングブートアクチュエータでデータベース(MySQL)を監視したいと思っています。私は自分のデータベースの状態を見たい。
誰でもお手伝いできますか?
データベースのステータスが必要ですか?もっと詳しく説明してください。 –
はい、データベースステータスが必要です。私は春のブートに慣れているので、春の起動用アクチュエータを使用してデータベースの最大の詳細を把握できません。 – Harshil