如何在启动SLF4J之前运行一个类 – Logback?
正如标题所说,我想运行一个类,它将在启动logback之前检查目录中是否存在属性。 所以我试过的是我在spring的监听器之前放置一个将在启动时启动的监听器,并且我确保在该监听器中没有使用Logger。 但是Logger仍然设法在听众面前解雇。 这是我的web.xml:
SekaiServer listener.InitLog listener.InitConfig listener.InitListener contextConfigLocation classpath:spring/application-config.xml /WEB-INF/security-context.xml org.springframework.web.context.ContextLoaderListener dispatcherServlet org.springframework.web.servlet.DispatcherServlet contextConfigLocation /WEB-INF/mvc-config.xml 1 dispatcherServlet / springSecurityFilterChain org.springframework.web.filter.DelegatingFilterProxy springSecurityFilterChain /*