|
|
@ -43,7 +43,6 @@ import org.springframework.boot.web.server.ErrorPage;
|
|
|
|
import org.springframework.boot.web.server.ErrorPageRegistrar;
|
|
|
|
import org.springframework.boot.web.server.ErrorPageRegistrar;
|
|
|
|
import org.springframework.boot.web.server.ErrorPageRegistry;
|
|
|
|
import org.springframework.boot.web.server.ErrorPageRegistry;
|
|
|
|
import org.springframework.core.Ordered;
|
|
|
|
import org.springframework.core.Ordered;
|
|
|
|
import org.springframework.core.annotation.Order;
|
|
|
|
|
|
|
|
import org.springframework.util.ClassUtils;
|
|
|
|
import org.springframework.util.ClassUtils;
|
|
|
|
import org.springframework.web.filter.OncePerRequestFilter;
|
|
|
|
import org.springframework.web.filter.OncePerRequestFilter;
|
|
|
|
import org.springframework.web.util.NestedServletException;
|
|
|
|
import org.springframework.web.util.NestedServletException;
|
|
|
@ -62,8 +61,7 @@ import org.springframework.web.util.NestedServletException;
|
|
|
|
* @author Andy Wilkinson
|
|
|
|
* @author Andy Wilkinson
|
|
|
|
* @since 2.0.0
|
|
|
|
* @since 2.0.0
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@Order(Ordered.HIGHEST_PRECEDENCE + 1)
|
|
|
|
public class ErrorPageFilter implements Filter, ErrorPageRegistry, Ordered {
|
|
|
|
public class ErrorPageFilter implements Filter, ErrorPageRegistry {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static final Log logger = LogFactory.getLog(ErrorPageFilter.class);
|
|
|
|
private static final Log logger = LogFactory.getLog(ErrorPageFilter.class);
|
|
|
|
|
|
|
|
|
|
|
@ -298,6 +296,11 @@ public class ErrorPageFilter implements Filter, ErrorPageRegistry {
|
|
|
|
public void destroy() {
|
|
|
|
public void destroy() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public int getOrder() {
|
|
|
|
|
|
|
|
return Ordered.HIGHEST_PRECEDENCE + 1;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private static void addClassIfPresent(Collection<Class<?>> collection, String className) {
|
|
|
|
private static void addClassIfPresent(Collection<Class<?>> collection, String className) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
collection.add(ClassUtils.forName(className, null));
|
|
|
|
collection.add(ClassUtils.forName(className, null));
|
|
|
|