estou testando o tratamento de erros no Spring Boot
@RestControllerAdvice
public class eventsException{
@ExceptionHandler(EntityNotFoundException.class)
private ResponseEntity eventNotFoundHandler(){
return ResponseEntity.notFound().build();
}
}
Deveria voltar apenas o erro 404 com o body vazio porem não vem
eu recebo esse erro
{
"timestamp": "2025-09-24T22:17:13.608+00:00",
"status": 404,
"error": "Not Found",
"message": "No static resource colaboradores/113.",
"path": "/colaboradores/113"
}