经常需要在各种中做一些模式匹配,正则表达式虽然是个好东西,但是Ant风格
的匹配情况也非常的多。
这种情况下使用正则表达式不一定方便,而Spring提供的AntPathMatcher
确可以帮助我们简化很多。
位于Spring-core
中的org.springframework.util.AntPathMatcher
使用起来非常简单:
1 | public class AntPathMatcherTest { |
</div>
经常需要在各种中做一些模式匹配,正则表达式虽然是个好东西,但是Ant风格
的匹配情况也非常的多。
这种情况下使用正则表达式不一定方便,而Spring提供的AntPathMatcher
确可以帮助我们简化很多。
位于Spring-core
中的org.springframework.util.AntPathMatcher
使用起来非常简单:
1 | public class AntPathMatcherTest { |
</div>