001/* 002 * Copyright 2002-2015 the original author or authors. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * https://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 017package org.springframework.web.bind.annotation; 018 019/** 020 * Java 5 enumeration of HTTP request methods. Intended for use with the 021 * {@link RequestMapping#method()} attribute of the {@link RequestMapping} annotation. 022 * 023 * <p>Note that, by default, {@link org.springframework.web.servlet.DispatcherServlet} 024 * supports GET, HEAD, POST, PUT, PATCH and DELETE only. DispatcherServlet will 025 * process TRACE and OPTIONS with the default HttpServlet behavior unless explicitly 026 * told to dispatch those request types as well: Check out the "dispatchOptionsRequest" 027 * and "dispatchTraceRequest" properties, switching them to "true" if necessary. 028 * 029 * @author Juergen Hoeller 030 * @since 2.5 031 * @see RequestMapping 032 * @see org.springframework.web.servlet.DispatcherServlet#setDispatchOptionsRequest 033 * @see org.springframework.web.servlet.DispatcherServlet#setDispatchTraceRequest 034 */ 035public enum RequestMethod { 036 037 GET, HEAD, POST, PUT, PATCH, DELETE, OPTIONS, TRACE 038 039}