exception
exception
exceptions;
import lombok.Getter;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.server.ResponseStatusException;
**************************************************ajout****************************
*********************
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.server.ResponseStatusException;
@Service
public class DvdService {
if (!ajoutReussi) {
// En cas d'erreur d'ajout, générez une DvdAddException
throw new DvdAddException(HttpStatus.BAD_REQUEST, "Erreur lors de
l'ajout du DVD");
}
}
}