- What is it? What can it do
Spring-based rapid development scaffolding
- Spring Boot application composition
- Pom.xml dependency files that provide dependency management and packaging
- Annotations @**** Automatic configuration is done through annotations
- Configuration application. The properties/yml configuration parameters and values
- Static Directory Static files
- Templates directory template files (JSPS, etc.)
- Develop spring Boot application sanbanax
- And rely on
The dependency package is introduced through POM.xml, and the rule of dependency package is as follows:
Boot Depends on spring-boot-starter-xxxx
Unofficially, xxX-spring-boot-starter is available
IO /projects/sp…
-
Write notes
-
Write the configuration
-
Actuator Spring Boot Monitors applications
Rely on
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
Copy the code
Annotations without
configuration
management.endpoint.health.show-details=always
management.endpoints.web.exposure.include=*
Copy the code
Common endpoint
http://localhost:8080/actuator/health
{status: "UP",components: {diskSpace: {status: "UP",details: {total: 146800635904,free: 84896886784,threshold: 10485760,exists: true}},ping: {status: "UP"}}}
status:
UP to normal
DOWN is abnormal. Procedure
OUT_OF_SERVICE The resource is not used
UNKNOW unknown
http://localhost:8080/actuator/info
You can use the info. XXX command to set the description of some applications.
http://localhost:8080/actuator/configprops
Displays configuration attributes that take effect
http://localhost:8080/actuator/metrics
Monitoring indicators
- profile
Yml uses a hyphen to distinguish characters
Public configuration properties
—
#profile= special attributes of x
—
#profile=y’s private attribute