Class ActuatorController
java.lang.Object
com.bobocode.bring.web.actuator.controller.ActuatorController
- All Implemented Interfaces:
BringServlet
Controller responsible for managing actuator endpoints.
Provides endpoints for checking application health, retrieving environment properties, Git information,
and dynamically changing log levels.
The class is annotated with @RestController
, indicating that it handles HTTP requests and
returns the response in the specified format. The base path for all endpoints is "/actuator".
The class has endpoints for checking the health of the application, retrieving environment properties, and getting Git information. Additionally, it includes an endpoint for dynamically changing the log level of specific loggers based on the package name.
Uses the DefaultActuatorService
for preparing actuator-related data and the
LogLevelChangerUtils
for dynamically changing log levels.
- Since:
- 1.0
- Author:
- Blyzhnytsia Team
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionenv()
Endpoint for retrieving environment properties of the application.health()
Endpoint for checking the health of the application.info()
Endpoint for retrieving Git information about the application.void
Endpoint for dynamically changing the log level of specific loggers based on package name.
-
Field Details
-
defaultActuatorService
-
-
Constructor Details
-
ActuatorController
public ActuatorController()
-
-
Method Details
-
health
Endpoint for checking the health of the application.- Returns:
- The HTTP status representing the health of the application.
-
env
Endpoint for retrieving environment properties of the application.- Returns:
- The environment properties of the application.
-
info
Endpoint for retrieving Git information about the application.- Returns:
- The Git information of the application.
-
logger
Endpoint for dynamically changing the log level of specific loggers based on package name.- Parameters:
packageName
- The name of the logger's package to change the level.newLevel
- The new log level for the specified logger's package.
-