Skip to content

Instantly share code, notes, and snippets.

@lhazlewood
Created May 22, 2012 20:43
Show Gist options
  • Save lhazlewood/2771499 to your computer and use it in GitHub Desktop.
Save lhazlewood/2771499 to your computer and use it in GitHub Desktop.
<bean id="restExceptionResolver" class="com.stormpath.spring.web.servlet.handler.RestExceptionHandler">
<property name="order" value="100"></property>
<property name="errorResolver">
<bean class="com.stormpath.spring.web.servlet.handler.DefaultRestErrorResolver">
<property name="localeResolver" ref="localeResolver"></property>
<property name="defaultMoreInfoUrl" value="mailto:support@mycompany.com"></property>
<property name="exceptionMappingDefinitions">
<map>
<!-- 404 -->
<entry key="com.stormpath.blog.spring.mvc.rest.exhandler.UnknownResourceException" value="404, _exmsg"></entry>
<!-- 500 (catch all): -->
<entry key="Throwable" value="500, error.internal"></entry>
</map>
</property>
</bean>
</property>
</bean>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment