code: public void setRequestMethods(String... requestMethods) {
          this.allowedMethods = requestMethods;
          if (this.allowedMethods != null) {
              for (int i = 0; i < this.allowedMethods.length; i++) {
                  this.allowedMethods[i] = this.allowedMethods[i].toUpperCase();
              }
          }
      }
docs: Configure the request method(s) over which the locale can be changed.
  
  @param requestMethods the methods