handlebars.JavaMicronaut.unsupportedOperationExceptionHandler.mustache Maven / Gradle / Ivy
package {{configPackage}};
import io.micronaut.context.annotation.Requires;
import io.micronaut.http.HttpRequest;
import io.micronaut.http.HttpResponse;
import io.micronaut.http.HttpStatus;
import io.micronaut.http.annotation.Produces;
import io.micronaut.http.server.exceptions.ExceptionHandler;
import jakarta.inject.Singleton;
@Produces
@Singleton
@Requires(classes = {UnsupportedOperationException.class, ExceptionHandler.class})
public class UnsupportedOperationExceptionHandler implements ExceptionHandler {
@Override
public HttpResponse handle(HttpRequest request, UnsupportedOperationException exception) {
return HttpResponse.status(HttpStatus.NOT_IMPLEMENTED);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy