List of usage examples for org.springframework.web.servlet.handler SimpleMappingExceptionResolver setExceptionAttribute
public void setExceptionAttribute(@Nullable String exceptionAttribute)
From source file:org.ameba.http.AbstractMvcConfiguration.java
/** * {@inheritDoc}/* w w w. j a va2s . c o m*/ * * Error page is tried to be resolved at public/error, the exception attribute is set to {@literal exception}. */ @Override public void configureHandlerExceptionResolvers(List<HandlerExceptionResolver> exceptionResolvers) { SimpleMappingExceptionResolver smer = new SimpleMappingExceptionResolver(); smer.setDefaultErrorView("public/error"); smer.setExceptionAttribute("exception"); exceptionResolvers.add(smer); }
From source file:org.meruvian.yama.webapi.config.JaxrsConfig.java
@Bean @ConditionalOnMissingBean(SimpleMappingExceptionResolver.class) public SimpleMappingExceptionResolver resteasyExceptionHandler() { SimpleMappingExceptionResolver resolver = new SimpleMappingExceptionResolver(); resolver.setExceptionMappings(new Properties() { {/*from w w w . ja va 2 s . co m*/ setProperty("org.jboss.resteasy.spi.NoResourceFoundFailure", "resteasyNoResourceFoundView"); } }); resolver.setExceptionAttribute("exception"); return resolver; }