ColleccionesControllerAdvice

    Master this deck with 12 terms through effective study methods.

    Generated from text input

    Created by @lexel

    What is a List?

    Allows duplicates and maintains insertion order.

    What defines a Set?

    Ensures uniqueness by not allowing duplicate elements.

    What is a Map used for?

    Stores key-value pairs for quick value retrieval.

    When should you use a Set?

    When you only need to check for existence without duplicates.

    When is a Map preferred over a List?

    When associating information with a unique key is necessary.

    What is the purpose of @ControllerAdvice in Spring Boot?

    Centralizes error handling across controllers.

    How do you create a custom exception in Spring Boot?

    Define a class extending RuntimeException for specific errors.

    What does the @ExceptionHandler annotation do?

    Captures specific exceptions and defines response behavior.

    What happens if a resource is not found in a controller?

    Throwing a custom exception triggers the global handler.

    What are the benefits of centralized exception handling?

    Consistent error responses and reduced code duplication.

    Why avoid generic error messages like 500 Internal Server Error?

    Specific errors provide clearer feedback to clients.

    What is the role of ResponseEntity in error handling?

    Allows flexible responses with status codes and headers.