public enum RequestMethod extends EnumSE<RequestMethod>
RequestMapping
アノテーションの RequestMapping.method()
属性での使用を目的としています。 デフォルトでは、DispatcherServlet
は GET、HEAD、POST、PUT、PATCH、DELETE のみをサポートすることに注意してください。DispatcherServlet は、明示的にこれらのリクエスト型もディスパッチするように指示されない限り、デフォルトの HttpServlet 動作で TRACE および OPTIONS を処理します。"dispatchOptionsRequest" および "dispatchTraceRequest" プロパティを確認し、必要に応じて "true" に切り替えます。
RequestMapping
, FrameworkServlet.setDispatchOptionsRequest(boolean)
, FrameworkServlet.setDispatchTraceRequest(boolean)
修飾子と型 | メソッドと説明 |
---|---|
static RequestMethod | valueOf(StringSE name) 指定された名前を持つこの型の列挙定数を返します。 |
static RequestMethod[] | values() この列挙型の定数を含む配列を、宣言されている順序で返します。 |
cloneSE, compareToSE, equalsSE, finalizeSE, getDeclaringClassSE, hashCodeSE, nameSE, ordinalSE, toStringSE, valueOfSE
getClassSE, notifySE, notifyAllSE, waitSE, waitSE, waitSE
public static final RequestMethod GET
public static final RequestMethod HEAD
public static final RequestMethod POST
public static final RequestMethod PUT
public static final RequestMethod PATCH
public static final RequestMethod DELETE
public static final RequestMethod OPTIONS
public static final RequestMethod TRACE
public static RequestMethod[] values()
for (RequestMethod c : RequestMethod.values()) System.out.println(c);
public static RequestMethod valueOf(StringSE name)
name
- 返される列挙定数の名前。IllegalArgumentExceptionSE
- この列挙型に指定された名前の定数がない場合 NullPointerExceptionSE
- 引数が null の場合