URL变量提取的代码实现
文章目录
代码
1 | public static void main(String[] args){ |
输出结果
1 | id:123 |
AntPathMatcher 是 Spring core 提供的一个工具类。使用这个工具类我们可以很容易的实现URL里变量的提取。 我们在spring里常见的代码是:
1 |
|
通过AntPathMatcher 就可以自己实现URL里的变量提取了。
代码
1 | public static void main(String[] args){ |
输出结果
1 | id:123 |
AntPathMatcher 是 Spring core 提供的一个工具类。使用这个工具类我们可以很容易的实现URL里变量的提取。 我们在spring里常见的代码是:
1 |
|
通过AntPathMatcher 就可以自己实现URL里的变量提取了。