SpringBoot - RequestMappingHandlerMapping 重复

SpringBoot - RequestMappingHandlerMapping Repetition

提问人:kim 提问时间:11/17/2023 更新时间:11/17/2023 访问量:38

问:

迁移到 Spring 3.1.5 后,RequestMapping HandlerMapping 反复出现。我不认为这是正常情况,我可以问问你的意见吗?

下面是 API 调用后的日志。

我正在单独学习,但这部分让我很困扰。请帮帮我ᅮ_ᅲ

2023-11-17T05:43:49.145+09:00 DEBUG 67513 --- [p-nio-80-exec-4] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped to com.template.server.domain.article.controller.ArticleController#articleList(Pageable)
2023-11-17T05:43:49.145+09:00 DEBUG 67513 --- [p-nio-80-exec-4] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped to com.template.server.domain.article.controller.ArticleController#articleList(Pageable)
2023-11-17T05:43:49.145+09:00 DEBUG 67513 --- [p-nio-80-exec-4] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped to com.template.server.domain.article.controller.ArticleController#articleList(Pageable)
2023-11-17T05:43:49.146+09:00 DEBUG 67513 --- [p-nio-80-exec-4] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped to com.template.server.domain.article.controller.ArticleController#articleList(Pageable)
2023-11-17T05:43:49.146+09:00 DEBUG 67513 --- [p-nio-80-exec-4] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped to com.template.server.domain.article.controller.ArticleController#articleList(Pageable)
2023-11-17T05:43:49.146+09:00 DEBUG 67513 --- [p-nio-80-exec-4] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped to com.template.server.domain.article.controller.ArticleController#articleList(Pageable)
2023-11-17T05:43:49.146+09:00 DEBUG 67513 --- [p-nio-80-exec-4] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped to com.template.server.domain.article.controller.ArticleController#articleList(Pageable)
2023-11-17T05:43:49.146+09:00 DEBUG 67513 --- [p-nio-80-exec-4] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped to com.template.server.domain.article.controller.ArticleController#articleList(Pageable)
2023-11-17T05:43:49.147+09:00 DEBUG 67513 --- [p-nio-80-exec-4] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped to com.template.server.domain.article.controller.ArticleController#articleList(Pageable)
2023-11-17T05:43:49.147+09:00 DEBUG 67513 --- [p-nio-80-exec-4] o.s.web.servlet.DispatcherServlet        : GET "/api/v1/article?sort=createdAt,desc", parameters={sort:[createdAt,desc]}
2023-11-17T05:43:49.147+09:00 DEBUG 67513 --- [p-nio-80-exec-4] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped to com.template.server.domain.article.controller.ArticleController#articleList(Pageable)
logging:
  level:
    org:
      springframework:
        web: debug
    org.springframework.web.servlet: debug
    org.hibernate.type.descriptor.sql.BasicBinder: trace

日志记录级别如下。

Spring Security 也被应用了,但这是过滤器问题吗?

Java 弹簧

评论

0赞 Jorge Campos 11/17/2023
你在哪里提出这个要求?从浏览器?如果是这样,我建议检查浏览器开发工具,网络选项卡。如果后端代码未触发这些调用,则很可能是前端应用程序触发了这些调用。
0赞 Jorge Campos 11/17/2023
以防万一你不知道我在说什么,这里是对Chrome的解释:developer.chrome.com/docs/devtools/network
0赞 kim 11/17/2023
谢谢你的回答。但我正在与邮递员一起进行特定的 api 测试。运动没有问题,但这是个人的好奇心。那么,为什么会出现这个问题..
0赞 Jorge Campos 11/18/2023
这可能是 Handler 类打印大量泛型日志。您可以随时下载源代码并对其进行调试。

答: 暂无答案