-
Notifications
You must be signed in to change notification settings - Fork 8.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spring Web adapter throws ErrorEntryFreeException #1482
Comments
Check if exists in log message: The Refer to #1392 |
是的 csp log 出现了 2020-05-15 08:03:54.739 WARNING [{}] The attribute key '{0}' already exists in request, please set SentinelWebInterceptor 没有 出现在 项目配置,都是 用的默认的 经常访问这个 地址 http://localhost/test (有路由映射但是模板确实不存)这种情况 抛出这个 异常 不会影响 项目运行吧? 在举个例子 test4,test5 没有这个 路由映射(@RequestMapping("/test4")) 这种情况访问 就不会 抛出异常,单纯 模板不存的情况下 才抛出这个 异常
|
If the template Maybe in SentinelProperties.Filter filterConfig = properties.getFilter();
registry.addInterceptor(sentinelWebInterceptorOptional.get())
.order(filterConfig.getOrder())
.addPathPatterns(filterConfig.getUrlPatterns())
.excludePathPatterns(xxx) We may need exclude some path Another way to solve this is add custom @Component
public class CustomUrlCleaner implements UrlCleaner {
@Override
public String clean(String originUrl) {
// return originUrl.endsWith(".html") ? "" : originUrl;
return originUrl.equals("/**") ? "" : originUrl;
}
} Note that the originUrl of Considering the above situation and html template resources, and don't want to limit the html resource, this is better: |
Any feedback? |
谢谢 问题已解决 |
spring boot Controller 视图 模板文件不存在时报
com.alibaba.csp.sentinel.ErrorEntryFreeException: The order of entry exit can't be paired with the order of entry, current entry in context: </**>, but expected: </test3>
/btl 文件夹下 不存 index.html 模板 访问http://localhost/test
The text was updated successfully, but these errors were encountered: