Implementar OPÇÕES do método HTTP no Spring MVC 3.2.1

package com.fbecart.servlet;import java.io.IOException;import javax.servlet.ServletException;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletResponse;import org.springframework.context.ApplicationContext;import org.springframework.web.HttpRequestMethodNotSupportedException;import org.springframework.web.servlet.DispatcherServlet;import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;import com.google.common.base.Joiner;@SuppressWarnings(“serial”)public class CustomDispatcherServlet extends DispatcherServlet { private RequestMappingHandlerMapping requestMappingHandlerMapping; @Override protected void onRefresh(ApplicationContext context) { super.onRefresh(context); requestMappingHandlerMapping = context.getBean(RequestMappingHandlerMapping.class); } …

Continuar lendo