title: Spring - how to handle exception
body: <p>I am using Spring with Velocity. At times velocity produces an exception like </p>
  
  <blockquote>
    <p>Error in interpolating string literal : org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getMessage' in  class org.springframework.web.servlet.support.RequestContext threw exception class org.springframework.context.NoSuchMessageException : No message found under code 'XX' for locale 'en_US'.</p>
  </blockquote>
  
  <p>Question is - can I instruct spring to suppress <code>NoSuchMessageException</code> ? I am pretty new to Spring so do not know if I can create a exception handler which will not throw a exception if the message is not found? In my use case, it is a valid use case of not finding some of the messages in the <code>messages.properties</code> file.</p>
  
  <p>[EDIT] - I found a way <code>org.apache.velocity.app.event.MethodExceptionEventHandler</code> to supply an even handler to velocity. I am however not sure how to register it with Spring.</p>