一点关于UrlCleaner的改进建议和意见 #1287
Labels
area/integrations
Issues or PRs related to integrations with open-source components
good first issue
Good for newcomers
kind/enhancement
Category issues or prs related to enhancement.
这里,UrlCleaner特指sentinel-spring-webmvc-adapter中的UrlCleaner:
https://github.com/alibaba/Sentinel/blob/master/sentinel-adapter/sentinel-spring-webmvc-adapter/src/main/java/com/alibaba/csp/sentinel/adapter/spring/webmvc/callback/UrlCleaner.java
个人认为有两点值得改进:
UrlCleaner名称词不达意。UrlCleaner重写的不是Url,而是资源名称,叫ResourceNameRewiter或许更加贴切。
目前UrlCleaner提供的参数较少,能定制的空间很小。目前只能在原资源名称的基础上改写资源。但实际业务中,往往需要根据具体的请求重写资源名称。因此,加上
HttpServletRequest
的参数灵活性会好很多。The text was updated successfully, but these errors were encountered: