Spring Boot 2.3 Application Availability

[Spring Boot Features --1.6. Application Availability](https://docs.spring.io/spring-boot/docs/2.3.0.RELEASE/reference/html/spring-boot-features.html#boot-features-application -A memo that just moved (availability).

build.gradle


plugins {
  id 'org.springframework.boot' version '2.3.0.RELEASE'
  id 'io.spring.dependency-management' version '1.0.9.RELEASE'
  id 'java'
}

sourceCompatibility = '11'
repositories {
  mavenCentral()
}
dependencies {
  implementation 'org.springframework.boot:spring-boot-starter-actuator'
  implementation 'org.springframework.boot:spring-boot-starter-web'
  testImplementation('org.springframework.boot:spring-boot-starter-test') {
    exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
  }
}
test {
  useJUnitPlatform()
}
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class Main {
 
  public static void main(String[] args) {
    SpringApplication.run(Main.class, args);
  }
}

application.properties


management.health.probes.enabled=true

Now when you access `http: // localhost: 8080 / actuator / health / liveness``` or `http: // localhost: 8080 / actuator / health / readiness```, you will get the following:

{"status":"UP"}

Recommended Posts

Spring Boot 2.3 Application Availability
[Spring Boot] Web application creation
CICS-Run Java application-(4) Spring Boot application
Spring Boot application development in Eclipse
Spring Boot application code review points
Inquiry application creation with Spring Boot
Implement Spring Boot application in Gradle
Spring Boot Form
gae + spring boot
Processing at application startup with Spring Boot
Start web application development with Spring Boot
Launch Nginx + Spring Boot application with docker-compose
Run WEB application with Spring Boot + Thymeleaf
Configure Spring Boot application with maven multi module
SPRING BOOT learning record 01
Spring Boot + Heroku Postgres
Spring boot memo writing (1)
First Spring Boot (DI)
SPRING BOOT learning record 02
Spring Boot2 cheat sheet
Create a Spring Boot application using IntelliJ IDEA
Spring Boot exception handling
Spring Boot Servlet mapping
Spring boot development-development environment-
Spring Boot learning procedure
Learning Spring Boot [Beginning]
Spring boot memo writing (2)
Spring Boot 2.2 Document Summary
[Spring Boot] DataSourceProperties $ DataSourceBeanCreationException
Deploy a Spring Boot application on Elastic Beanstalk
Spring boot tutorials Topics
Download with Spring Boot
Spring Boot application built-in Tomcat, Apache and WebSocket integration
Try using OpenID Connect with Keycloak (Spring Boot application)
[Spring Boot] Environment construction (macOS)
Try Spring Boot from 0 to 100.
Generate barcode with Spring Boot
Hello World with Spring Boot
Spring Boot on Microsoft Azure
Implement GraphQL with Spring Boot
Spring Boot tutorial task schedule
Spring 5 & Spring Boot 2 Hands-on preparation procedure
Get started with Spring boot
Hello World with Spring Boot!
Spring Boot 2 multi-project in Gradle
Run LIFF with Spring Boot
SNS login with Spring Boot
Spring Boot Hot Swapping settings
[Java] Thymeleaf Basic (Spring Boot)
Introduction to Spring Boot ① ~ DI ~
File upload with Spring Boot
Spring Boot starting with copy
Introduction to Spring Boot ② ~ AOP ~
Spring Boot starting with Docker
Spring Boot + Springfox springfox-boot-starter 3.0.0 Use
Spring Boot DB related tips
Hello World with Spring Boot
Set cookies with Spring Boot
[Spring Boot] Easy paging recipe
Use Spring JDBC with Spring Boot
Docker × Spring Boot environment construction