How to customly handle Recourse/URLs Not Found in Quarkus?
问题 I'm very new to Quarkus and I will like to know how I can override default 404 page which provides the error logs or how I can neatly redirect all not recognized URLs to a custom HTML in the META-INF/recourses directory. 回答1: Using quarkus 0.20+ you can create an ExceptionMapper like this: import java.util.Scanner; import javax.ws.rs.NotFoundException; import javax.ws.rs.core.Response; import javax.ws.rs.ext.ExceptionMapper; import javax.ws.rs.ext.Provider; /** * NotFoundExepptionMapper */