我在类路径上使用 Spring 3.1.2 和 javax.inject.jar,我将以下消息打印到我的日志文件中。对于应用程序的每个 Web 请求,我都会得到这六行输出。
00:53:11,291 INFO [ClassPathScanningCandidateComponentProvider] JSR-330 'javax.inject.Named' annotation found and supported for component scanning
00:53:11,301 INFO [ClassPathScanningCandidateComponentProvider] JSR-330 'javax.inject.Named' annotation found and supported for component scanning
00:53:11,309 INFO [ClassPathScanningCandidateComponentProvider] JSR-330 'javax.inject.Named' annotation found and supported for component scanning
00:53:11,417 INFO [ClassPathScanningCandidateComponentProvider] JSR-330 'javax.inject.Named' annotation found and supported for component scanning
00:53:11,431 INFO [ClassPathScanningCandidateComponentProvider] JSR-330 'javax.inject.Named' annotation found and supported for component scanning
00:53:11,455 INFO [ClassPathScanningCandidateComponentProvider] JSR-330 'javax.inject.Named' annotation found and supported for component scanning
问题:
- 为什么每次请求都会打印上述消息?
- 如何阻止它在每个请求上打印?
更新:这是春季启动的方式:
<!-- Listeners that startup spring -->
<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.security.web.session.HttpSessionEventPublisher</listener-class>
</listener>
<!-- main dispatcher servlet -->
<servlet>
<servlet-name>main</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>main</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
我正在使用 JRebel,但我不确定这是否会启动额外的上下文作为其破解 JVM 和库以支持实时重新加载的一部分。
我可以配置任何调试标志或类别来找出问题发生在哪里?