gpt4 book ai didi

java - 正在加载重复的 Spring 配置?

转载 作者:行者123 更新时间:2023-11-28 22:15:22 24 4
gpt4 key购买 nike

我正在查看由 tomcat 加载的 spring 的输出,有一些非常奇怪的东西......一切都是重复的。什么会导致这个?不管是什么原因,它都会导致我的应用程序以奇怪的方式运行。

附加信息:

该应用程序是一个网络应用程序。所有 spring 信息都是使用 web.xml 文件中定义的上下文加载器(?)加载的。我的配置文件分为 6 个(左右)文件。

示例调试输出:

[DEBUG,DefaultFilterInvocationDefinitionSource,main] Added URL pattern: /**; attributes: [REQUIRES_SECURE_CHANNEL]

[DEBUG,DefaultFilterInvocationDefinitionSource,main] Added URL pattern: /**; attributes: [REQUIRES_SECURE_CHANNEL]

[DEBUG,DefaultFilterInvocationDefinitionSource,main] Added URL pattern: /**; attributes: [ROLE_READ, ROLE_UPDATE]

[DEBUG,DefaultFilterInvocationDefinitionSource,main] Added URL pattern: /**; attributes: [ROLE_READ, ROLE_UPDATE]

[DEBUG,AbstractFallbackMethodDefinitionSource,main] Adding security method [CacheKey[com.service.impl.FooServiceImpl; public abstract java.lang.Boolean com.service.IFooService.saveOrUpdateFoo(com.model.Foo2,java.lang.String) throws org.springframework.dao.DataAccessException]] with attribute [[ROLE_UPDATE]]

[DEBUG,AbstractFallbackMethodDefinitionSource,main] Adding security method [CacheKey[com.service.impl.FooServiceImpl; public abstract java.lang.Boolean com.service.IFooService.saveOrUpdateFoo(com.model.Foo2,java.lang.String) throws org.springframework.dao.DataAccessException]] with attribute [[ROLE_UPDATE]]

[INFO,AbstractSecurityInterceptor,main] Validated configuration attributes

[INFO,AbstractSecurityInterceptor,main] Validated configuration attributes

最佳答案

您确定日志记录配置中的某些内容没有将每个类别/记录器多次添加到附加程序吗?

这对 log4j 来说是可能的,不确定 JCL 或任何最新版本的 Tomcat 在幕后使用。

关于java - 正在加载重复的 Spring 配置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/244620/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com