title: Spring: SimpleMappingExceptionResolver together with @ExceptionHandler?
body: <p>I like <a href="http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/web/servlet/handler/SimpleMappingExceptionResolver.html" rel="noreferrer"><code>SimpleMappingExceptionResolver</code></a>, because in one place i have all exception->view mappings for all controllers in web-app (i suppose that). To customize some exception in specific controller i would like to use <code>@ExceptionHandler</code>, but it doesn't work together - all exceptions are handled by <code>SimpleMappingExceptionResolver</code>. How to make this work together ?</p>
  
  <pre><code>@Controller
  public class SomeController {
      ...
  
      @ExceptionHandler(SomeException.class)
      public ModelAndView handleException(Exception ex) {
           // ...
      }   
  
  }
  </code></pre>
  
  <p>SimpleMappingExceptionResolver:</p>
  
  <pre><code>&lt;bean class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver"&gt;
      &lt;property name="defaultErrorView" value="error"/&gt;
      &lt;property name="exceptionMappings"&gt;
          ...
      &lt;/property&gt;
  &lt;/bean&gt; 
  </code></pre>