Class ServiceController
java.lang.Object
com.nmontytskyi.monitoring.server.controller.ServiceController
@Validated
@RestController
@RequestMapping("/api/services")
public class ServiceController
extends Object
REST controller for managing the registry of monitored microservices.
Provides endpoints to register a new service (invoked automatically by the starter
on application startup), retrieve service details, list all services, and unregister
a service. Delegates to
RegisteredServiceService.
- Author:
- Nazar Montytskyi
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<Void> deleteById(Long id) org.springframework.http.ResponseEntity<List<ServiceResponse>> findAll()org.springframework.http.ResponseEntity<ServiceResponse> org.springframework.http.ResponseEntity<ServiceResponse> register(@Valid ServiceRegistrationRequest request)
-
Constructor Details
-
ServiceController
public ServiceController()
-
-
Method Details
-
register
@PostMapping public org.springframework.http.ResponseEntity<ServiceResponse> register(@Valid @RequestBody @Valid ServiceRegistrationRequest request) -
findAll
-
findById
@GetMapping("/{id}") public org.springframework.http.ResponseEntity<ServiceResponse> findById(@PathVariable Long id) -
deleteById
-