Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
爱吃血肠
spring-framework
提交
ac6c96a3
S
spring-framework
项目概览
爱吃血肠
/
spring-framework
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
spring-framework
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ac6c96a3
编写于
5月 11, 2019
作者:
R
Rossen Stoyanchev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Polish
上级
e0654a5b
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
17 addition
and
20 deletion
+17
-20
spring-web/src/main/java/org/springframework/http/server/PathContainer.java
...n/java/org/springframework/http/server/PathContainer.java
+16
-19
spring-web/src/main/java/org/springframework/web/util/pattern/PathPattern.java
...ava/org/springframework/web/util/pattern/PathPattern.java
+1
-1
未找到文件。
spring-web/src/main/java/org/springframework/http/server/PathContainer.java
浏览文件 @
ac6c96a3
/*
* Copyright 2002-201
7
the original author or authors.
* Copyright 2002-201
9
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.
...
...
@@ -21,14 +21,13 @@ import java.util.List;
import
org.springframework.util.MultiValueMap
;
/**
* Structured representation of a URI path whose elements have been pre-parsed
* into a sequence of {@link Separator Separator} and {@link PathSegment
* PathSegment} elements.
* Structured representation of a URI path parsed via {@link #parsePath(String)}
* into a sequence of {@link Separator} and {@link PathSegment} elements.
*
* <p>
An instance of this class can be created via {@link #parsePath(String)}.
*
Each {@link PathSegment PathSegment} exposes its structure decoded
*
safely without the risk of encoded reserved characters altering the path or
*
segment structure and without path parameters for path matching purposes
.
* <p>
Each {@link PathSegment} exposes its content in decoded form and with path
*
parameters removed. This makes it safe to match one path segment at a time
*
without the risk of decoded reserved characters altering the structure of
*
the path
.
*
* @author Rossen Stoyanchev
* @since 5.0
...
...
@@ -36,12 +35,12 @@ import org.springframework.util.MultiValueMap;
public
interface
PathContainer
{
/**
* The original
(raw, encoded) path that this instance was parsed from
.
* The original
path from which this instance was parsed
.
*/
String
value
();
/**
* The
list of
path elements, either {@link Separator} or {@link PathSegment}.
* The
contained
path elements, either {@link Separator} or {@link PathSegment}.
*/
List
<
Element
>
elements
();
...
...
@@ -55,8 +54,8 @@ public interface PathContainer {
}
/**
* Extract a sub-path from the given start offset
(inclusive) into the
*
element list
and to the end offset (exclusive).
* Extract a sub-path from the given start offset
into the element list
*
(inclusive)
and to the end offset (exclusive).
* @param startIndex the start element index (inclusive)
* @param endIndex the end element index (exclusive)
* @return the sub-path
...
...
@@ -78,12 +77,12 @@ public interface PathContainer {
/**
*
Common representation of a path element, e.g. separator or
segment.
*
A path element, either separator or path
segment.
*/
interface
Element
{
/**
*
Return the original (raw, encoded) value of this path
element.
*
The unmodified, original value of this
element.
*/
String
value
();
}
...
...
@@ -102,19 +101,17 @@ public interface PathContainer {
interface
PathSegment
extends
Element
{
/**
* Return the path segment value to use for pattern matching purposes.
* By default this is the same as {@link #value()} but may also differ
* in sub-interfaces (e.g. decoded, sanitized, etc.).
* Return the path segment value, decoded and sanitized, for path matching.
*/
String
valueToMatch
();
/**
*
The same as {@link #valueToMatch()} but as a {@code char[]}
.
*
Expose {@link #valueToMatch()} as a character array
.
*/
char
[]
valueToMatchAsChars
();
/**
* Path parameters
parsed from the
path segment.
* Path parameters
associated with this
path segment.
*/
MultiValueMap
<
String
,
String
>
parameters
();
}
...
...
spring-web/src/main/java/org/springframework/web/util/pattern/PathPattern.java
浏览文件 @
ac6c96a3
...
...
@@ -352,7 +352,7 @@ public class PathPattern implements Comparable<PathPattern> {
}
/**
* Combine this pattern with another.
Currently does not produce a new PathPattern, just produces a new string.
* Combine this pattern with another.
*/
public
PathPattern
combine
(
PathPattern
pattern2string
)
{
// If one of them is empty the result is the other. If both empty the result is ""
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录