Skip to content

Instantly share code, notes, and snippets.

@panchenko
Last active January 19, 2018 09:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save panchenko/abba7063ff62946facc83a09748c277b to your computer and use it in GitHub Desktop.
Save panchenko/abba7063ff62946facc83a09748c277b to your computer and use it in GitHub Desktop.
@Bean
public static TomcatEmbeddedServletContainerFactory tomcatEmbeddedServletContainerFactory() {
return new TomcatEmbeddedServletContainerFactory() {
@Override
protected TomcatEmbeddedServletContainer getTomcatEmbeddedServletContainer(Tomcat tomcat) {
final ErrorReportValve errorReportValve = new ErrorReportValve();
errorReportValve.setShowServerInfo(false);
errorReportValve.setShowReport(false);
tomcat.getHost().getPipeline().addValve(errorReportValve);
return super.getTomcatEmbeddedServletContainer(tomcat);
}
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment