congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
RequestMethod.values
Code IndexAdd Tabnine to your IDE (free)

How to use
values
method
in
org.springframework.web.bind.annotation.RequestMethod

Best Java code snippets using org.springframework.web.bind.annotation.RequestMethod.values (Showing top 7 results out of 315)

origin: spring-projects/spring-framework

@Test
public void getMatchingConditionWithEmptyConditions() {
  RequestMethodsRequestCondition condition = new RequestMethodsRequestCondition();
  for (RequestMethod method : RequestMethod.values()) {
    if (method != OPTIONS) {
      HttpServletRequest request = new MockHttpServletRequest(method.name(), "");
      assertNotNull(condition.getMatchingCondition(request));
    }
  }
  testNoMatch(condition, OPTIONS);
}
origin: spring-projects/spring-framework

@Test
public void getMatchingConditionWithEmptyConditions() throws Exception {
  RequestMethodsRequestCondition condition = new RequestMethodsRequestCondition();
  for (RequestMethod method : RequestMethod.values()) {
    if (method != OPTIONS) {
      ServerWebExchange exchange = getExchange(method.name());
      assertNotNull(condition.getMatchingCondition(exchange));
    }
  }
  testNoMatch(condition, OPTIONS);
}
origin: io.springfox/springfox-swagger-common

@Override
public void apply(OperationContext context) {
 Optional<ApiOperation> apiOperationAnnotation = context.findAnnotation(ApiOperation.class);
 if (apiOperationAnnotation.isPresent() && StringUtils.hasText(apiOperationAnnotation.get().httpMethod())) {
  String apiMethod = apiOperationAnnotation.get().httpMethod();
  try {
   RequestMethod.valueOf(apiMethod);
   context.operationBuilder().method(HttpMethod.valueOf(apiMethod));
  } catch (IllegalArgumentException e) {
   log.error("Invalid http method: " + apiMethod + "Valid ones are [" + RequestMethod.values() + "]", e);
  }
 }
}
origin: yujunhao8831/spring-boot-start-current

private void apiHandle ( PermissionResourceForm form , PermissionResource resource ) {
  if ( Objects.equals( resource.getResourceType().getValue() , ResourceType.API.getValue() ) ) {
    final Set< String > methods = Stream.of( RequestMethod.values() )
                      .map( RequestMethod::name )
                      .collect( Collectors.toSet() );
    for ( String method : form.getResourceApiUriMethods() ) {
      AssertUtils.isTrue( ! methods.contains( method ) , "操作失败,resourceApiUriMethods格式不正确" );
    }
    resource.setResourceApiUriMethods(
        form.getResourceApiUriMethods()
          .parallelStream()
          .collect( Collectors.joining( "," ) )
    );
    // 接口类型处理
    // + 接口类型权限资源, 这两个字段不能为空 -> resourceApiUri  resourceApiUriMethods
    AssertUtils.isTrue(
        StringUtils.isBlank( resource.getResourceApiUri() ) ,
        "api类型权限资源,resourceApiUri字段不能为空"
    );
    AssertUtils.isTrue(
        StringUtils.isBlank( resource.getResourceApiUriMethods() ) ,
        "api类型权限资源,resourceApiUriMethods字段不能为空"
    );
  }
}
origin: com.github.wnameless.spring/spring-routing-resolver

for (RequestMethod m : RequestMethod.values()) {
 rawPathsAndMethods.add(Maps.immutableEntry(
   PathUtils.joinPaths(prefixPath, suffixPath), m));
origin: com.github.springdox/springdox-swagger-common

@Override
public void apply(OperationContext context) {
 HandlerMethod handlerMethod = context.getHandlerMethod();
 ApiOperation apiOperationAnnotation = handlerMethod.getMethodAnnotation(ApiOperation.class);
 if (apiOperationAnnotation != null && StringUtils.hasText(apiOperationAnnotation.httpMethod())) {
  String apiMethod = apiOperationAnnotation.httpMethod();
  try {
   RequestMethod.valueOf(apiMethod);
   context.operationBuilder().method(apiMethod);
  } catch (IllegalArgumentException e) {
   log.error("Invalid http method: " + apiMethod + "Valid ones are [" + RequestMethod.values() + "]", e);
  }
 }
}
origin: com.mangofactory/swagger-springmvc

 @Override
 public void execute(RequestMappingContext context) {
  RequestMethod currentHttpMethod = (RequestMethod) context.get("currentHttpMethod");
  HandlerMethod handlerMethod = context.getHandlerMethod();

  String requestMethod = currentHttpMethod.toString();
  ApiOperation apiOperationAnnotation = handlerMethod.getMethodAnnotation(ApiOperation.class);

  if (apiOperationAnnotation != null && StringUtils.hasText(apiOperationAnnotation.httpMethod())) {
   String apiMethod = apiOperationAnnotation.httpMethod();
   try {
    RequestMethod.valueOf(apiMethod);
    requestMethod = apiMethod;
   } catch (IllegalArgumentException e) {
    log.error("Invalid http method: " + apiMethod + "Valid ones are [" + RequestMethod.values() + "]", e);
   }
  }
  context.put("httpRequestMethod", requestMethod);
 }
}
org.springframework.web.bind.annotationRequestMethodvalues

Popular methods of RequestMethod

  • name
  • toString
  • valueOf
  • equals
  • hashCode
  • compareTo

Popular in Java

  • Running tasks concurrently on multiple threads
  • setRequestProperty (URLConnection)
  • onCreateOptionsMenu (Activity)
  • getExternalFilesDir (Context)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now