Polishing
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -96,7 +96,7 @@ public abstract class ResourceTransformerSupport implements ResourceTransformer
|
||||
*/
|
||||
protected String toAbsolutePath(String path, ServerWebExchange exchange) {
|
||||
String requestPath = exchange.getRequest().getURI().getPath();
|
||||
String absolutePath = path.startsWith("/") ? path : StringUtils.applyRelativePath(requestPath, path);
|
||||
String absolutePath = (path.startsWith("/") ? path : StringUtils.applyRelativePath(requestPath, path));
|
||||
return StringUtils.cleanPath(absolutePath);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2017 the original author or authors.
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -37,7 +37,7 @@ import org.springframework.web.util.pattern.PathPattern;
|
||||
import org.springframework.web.util.pattern.PathPatternParser;
|
||||
|
||||
/**
|
||||
* Encapsulates the following request mapping conditions:
|
||||
* Request mapping information. Encapsulates the following request mapping conditions:
|
||||
* <ol>
|
||||
* <li>{@link PatternsRequestCondition}
|
||||
* <li>{@link RequestMethodsRequestCondition}
|
||||
@@ -201,7 +201,7 @@ public final class RequestMappingInfo implements RequestCondition<RequestMapping
|
||||
return this.name;
|
||||
}
|
||||
else {
|
||||
return (other.name != null ? other.name : null);
|
||||
return other.name;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -492,7 +492,7 @@ public final class RequestMappingInfo implements RequestCondition<RequestMapping
|
||||
PatternsRequestCondition patternsCondition = new PatternsRequestCondition(parse(this.paths, parser));
|
||||
|
||||
return new RequestMappingInfo(this.mappingName, patternsCondition,
|
||||
new RequestMethodsRequestCondition(methods),
|
||||
new RequestMethodsRequestCondition(this.methods),
|
||||
new ParamsRequestCondition(this.params),
|
||||
new HeadersRequestCondition(this.headers),
|
||||
new ConsumesRequestCondition(this.consumes, this.headers),
|
||||
|
||||
Reference in New Issue
Block a user