Replace deprecated method
Replace HttpMethod.resolve() to HttpMethod.valueOf()
This commit is contained in:
parent
7be710a9e3
commit
d8eadd2207
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2020 the original author or authors.
|
* Copyright 2002-2023 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -66,7 +66,7 @@ public class DispatcherTypeRequestMatcher implements RequestMatcher {
|
||||||
@Override
|
@Override
|
||||||
public boolean matches(HttpServletRequest request) {
|
public boolean matches(HttpServletRequest request) {
|
||||||
if (this.httpMethod != null && StringUtils.hasText(request.getMethod())
|
if (this.httpMethod != null && StringUtils.hasText(request.getMethod())
|
||||||
&& this.httpMethod != HttpMethod.resolve(request.getMethod())) {
|
&& this.httpMethod != HttpMethod.valueOf(request.getMethod())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return this.dispatcherType == request.getDispatcherType();
|
return this.dispatcherType == request.getDispatcherType();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2002-2016 the original author or authors.
|
* Copyright 2002-2023 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -116,7 +116,7 @@ public final class RegexRequestMatcher implements RequestMatcher {
|
||||||
@Override
|
@Override
|
||||||
public boolean matches(HttpServletRequest request) {
|
public boolean matches(HttpServletRequest request) {
|
||||||
if (this.httpMethod != null && request.getMethod() != null
|
if (this.httpMethod != null && request.getMethod() != null
|
||||||
&& this.httpMethod != HttpMethod.resolve(request.getMethod())) {
|
&& this.httpMethod != HttpMethod.valueOf(request.getMethod())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
String url = request.getServletPath();
|
String url = request.getServletPath();
|
||||||
|
|
Loading…
Reference in New Issue