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 Details

    • ServiceController

      public ServiceController()
  • Method Details

    • register

      @PostMapping public org.springframework.http.ResponseEntity<ServiceResponse> register(@Valid @RequestBody @Valid ServiceRegistrationRequest request)
    • findAll

      @GetMapping public org.springframework.http.ResponseEntity<List<ServiceResponse>> findAll()
    • findById

      @GetMapping("/{id}") public org.springframework.http.ResponseEntity<ServiceResponse> findById(@PathVariable Long id)
    • deleteById

      @DeleteMapping("/{id}") public org.springframework.http.ResponseEntity<Void> deleteById(@PathVariable Long id)