Skip to content

Commit

Permalink
[pinpoint-apm#8402] Add ServletFilter based ErrorHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
emeroad committed Nov 12, 2021
1 parent cfba4cb commit 58333a7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.navercorp.pinpoint.web;

import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.boot.web.servlet.support.ErrorPageFilter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.filter.ShallowEtagHeaderFilter;
Expand All @@ -18,4 +19,9 @@ public FilterRegistrationBean etagFilterBean() {
filterBean.setUrlPatterns(Collections.singletonList("*"));
return filterBean;
}

@Bean
public Filter errorPageFilter() {
return new ErrorPageFilter();
}
}
7 changes: 7 additions & 0 deletions web/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,10 @@ spring:

server:
port: 8080
error:
include-exception: true
include-message: always
include-binding-errors: always
include-stacktrace: always
whitelabel:
enabled: true

0 comments on commit 58333a7

Please sign in to comment.