如何禁用 Spring 日志记录 DEBUG 消息?

2024-05-06

我正在开发一个简单的桌面应用程序(不是网络应用程序)。

这是我的log4j.properties:

log4j.rootCategory=INFO, stdout

log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %t %c{2}:%L $$$$ %m%n

log4j.logger.org.springframework=ERROR,stdout

如您所见,为了消除控制台中的 Spring 日志记录消息,我尝试了以下解决方案:

禁用Spring日志,以获得可读的日志 https://stackoverflow.com/questions/18648014/disabling-spring-log-to-have-readable-logs

当我从代码中调用 log4j 记录器时,日志消息根据上面指定的模式(这很好)。

然而,不好的部分是 - 我仍然从 spring 获得控制台 DEBUG 级别消息......它们看起来像这样:无法禁用日志消息 https://stackoverflow.com/questions/20957422/unable-to-disable-logging-messages

他们有不同的模式。好像他们忽略了我的设置。

我还尝试应用我在这里找到的建议:

https://spring.io/blog/2009/12/04/logging-dependency-in-spring https://spring.io/blog/2009/12/04/logging-dependencies-in-spring

在我的 pom 文件中:

    <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>1.2.17</version>
        <scope>runtime</scope>
    </dependency>

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-core</artifactId>
    <version>3.2.0.RELEASE</version>
</dependency>

而且没有 SLF4J。如果我没记错的话,上面的链接中提到这个选项是一个有效的选项。

我在这里可能会缺少什么?

输出 -Dlog4j.debug=true

log4j: Trying to find [log4j.xml] using context classloader sun.misc.Launcher$AppClassLoader@172aa3f.
log4j: Trying to find [log4j.xml] using sun.misc.Launcher$AppClassLoader@172aa3f class loader.
log4j: Trying to find [log4j.xml] using ClassLoader.getSystemResource().
log4j: Trying to find [log4j.properties] using context classloader sun.misc.Launcher$AppClassLoader@172aa3f.
log4j: Using URL [file:/C:/eclipse-workspace/workflow/target/classes/log4j.properties] for automatic log4j configuration.
log4j: Reading configuration from URL file:/C:/eclipse-workspace/workflow/target/classes/log4j.properties
log4j: Parsing for [root] with value=[INFO, stdout].
log4j: Level token is [INFO].
log4j: Category root set to INFO
log4j: Parsing appender named "stdout".
log4j: Parsing layout options for "stdout".
log4j: Setting property [conversionPattern] to [%d{ABSOLUTE} %5p %t %c{2}:%L $$$$ %m%n].
log4j: End of parsing for "stdout".
log4j: Parsed "stdout" options.
log4j: Parsing for [org.springframework] with value=[ERROR,stdout].
log4j: Level token is [ERROR].
log4j: Category org.springframework set to ERROR
log4j: Parsing appender named "stdout".
log4j: Appender "stdout" was already parsed.
log4j: Handling log4j.additivity.org.springframework=[null]
log4j: Finished configuring.
23:12:42.763 [main] DEBUG o.s.core.env.StandardEnvironment - Initializing new StandardEnvironment
23:12:42.768 [main] DEBUG o.s.core.env.StandardEnvironment - Adding [systemProperties] PropertySource with lowest search precedence
23:12:42.769 [main] DEBUG o.s.core.env.StandardEnvironment - Adding [systemEnvironment] PropertySource with lowest search precedence
23:12:42.769 [main] DEBUG o.s.core.env.StandardEnvironment - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
23:12:42.772 [main] INFO  o.s.c.s.ClassPathXmlApplicationContext - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@7badec: startup date [Thu Feb 13 23:12:42 EST 2014]; root of context hierarchy
23:12:42.809 [main] DEBUG o.s.core.env.StandardEnvironment - Initializing new StandardEnvironment
23:12:42.810 [main] DEBUG o.s.core.env.StandardEnvironment - Adding [systemProperties] PropertySource with lowest search precedence
23:12:42.810 [main] DEBUG o.s.core.env.StandardEnvironment - Adding [systemEnvironment] PropertySource with lowest search precedence
23:12:42.810 [main] DEBUG o.s.core.env.StandardEnvironment - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
23:12:42.819 [main] INFO  o.s.b.f.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [spring-module.xml]
23:12:42.832 [main] DEBUG o.s.b.f.xml.DefaultDocumentLoader - Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl]
23:12:42.852 [main] DEBUG o.s.b.f.xml.PluggableSchemaResolver - Loading schema mappings from [META-INF/spring.schemas]
23:12:42.857 [main] DEBUG o.s.b.f.xml.PluggableSchemaResolver - Loaded schema mappings: {http://www.springframework.org/schema/tx/spring-tx-2.5.xsd=org/springframework/transaction/config/spring-tx-2.5.xsd, http://www.springframework.org/schema/context/spring-context-3.1.xsd=org/springframework/context/config/spring-context-3.1.xsd, http://www.springframework.org/schema/util/spring-util-3.0.xsd=org/springframework/beans/factory/xml/spring-util-3.0.xsd, http://cxf.apache.org/schemas/configuration/http-conf.xsd=schemas/configuration/http-conf.xsd, http://cxf.apache.org/configuration/parameterized-types=schemas/configuration/parameterized-types.xsd, http://www.w3.org/TR/xmldsig-core/xmldsig-core-schema.xsd=schemas/xmldsig-core-schema.xsd, http://www.springframework.org/schema/security/spring-security-3.0.3.xsd=org/springframework/security/config/spring-security-3.0.3.xsd, http://www.springframework.org/schema/aop/spring-aop-3.2.xsd=org/springframework/aop/config/spring-aop-3.2.xsd, http://www.springframework.org/schema/tool/spring-tool.xsd=org/springframework/beans/factory/xml/spring-tool-3.2.xsd, http://www.springframework.org/schema/security/spring-security-2.0.1.xsd=org/springframework/security/config/spring-security-2.0.1.xsd, http://www.w3.org/2006/07/ws-policy.xsd=schemas/ws-policy-200607.xsd, http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd=org/springframework/web/servlet/config/spring-mvc-3.2.xsd, http://www.springframework.org/schema/oxm/spring-oxm-3.0.xsd=org/springframework/oxm/config/spring-oxm-3.0.xsd, http://www.springframework.org/schema/lang/spring-lang-3.2.xsd=org/springframework/scripting/config/spring-lang-3.2.xsd, http://www.springframework.org/schema/cache/spring-cache-3.2.xsd=org/springframework/cache/config/spring-cache-3.2.xsd, http://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd=org/springframework/jdbc/config/spring-jdbc-3.1.xsd, http://www.springframework.org/schema/util/spring-util-2.0.xsd=org/springframework/beans/factory/xml/spring-util-2.0.xsd, http://www.springframework.org/schema/context/spring-context.xsd=org/springframework/context/config/spring-context-3.2.xsd, http://www.springframework.org/schema/tool/spring-tool-3.2.xsd=org/springframework/beans/factory/xml/spring-tool-3.2.xsd, http://schemas.xmlsoap.org/ws/2004/08/addressing=schemas/wsdl/addressing.xsd, http://www.springframework.org/schema/jee/spring-jee-3.2.xsd=org/springframework/ejb/config/spring-jee-3.2.xsd, http://www.springframework.org/schema/security/spring-security-2.0.xsd=org/springframework/security/config/spring-security-2.0.xsd, http://www.springframework.org/schema/context/spring-context-3.0.xsd=org/springframework/context/config/spring-context-3.0.xsd, http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd=schemas/oasis-200401-wss-wssecurity-secext-1.0.xsd, http://www.springframework.org/schema/util/spring-util-2.5.xsd=org/springframework/beans/factory/xml/spring-util-2.5.xsd, http://www.springframework.org/schema/beans/spring-beans-3.2.xsd=org/springframework/beans/factory/xml/spring-beans-3.2.xsd, http://www.springframework.org/schema/aop/spring-aop-3.1.xsd=org/springframework/aop/config/spring-aop-3.1.xsd, http://schemas.xmlsoap.org/wsdl/=schemas/wsdl/wsdl.xsd, http://www.springframework.org/schema/mvc/spring-mvc.xsd=org/springframework/web/servlet/config/spring-mvc-3.2.xsd, http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd=org/springframework/web/servlet/config/spring-mvc-3.1.xsd, http://www.springframework.org/schema/lang/spring-lang-3.1.xsd=org/springframework/scripting/config/spring-lang-3.1.xsd, http://www.springframework.org/schema/tx/spring-tx-3.2.xsd=org/springframework/transaction/config/spring-tx-3.2.xsd, http://www.springframework.org/schema/cache/spring-cache-3.1.xsd=org/springframework/cache/config/spring-cache-3.1.xsd, http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd=org/springframework/jdbc/config/spring-jdbc-3.0.xsd, http://www.springframework.org/schema/jdbc/spring-jdbc.xsd=org/springframework/jdbc/config/spring-jdbc-3.2.xsd, http://www.springframework.org/schema/tool/spring-tool-3.1.xsd=org/springframework/beans/factory/xml/spring-tool-3.1.xsd, http://schemas.xmlsoap.org/wsdl/http/=schemas/wsdl/http.xsd, http://www.springframework.org/schema/jee/spring-jee-3.1.xsd=org/springframework/ejb/config/spring-jee-3.1.xsd, http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd=schemas/oasis-200401-wss-wssecurity-utility-1.0.xsd, http://cxf.apache.org/schemas/configuration/parameterized-types.xsd=schemas/configuration/parameterized-types.xsd, http://www.springframework.org/schema/task/spring-task-3.2.xsd=org/springframework/scheduling/config/spring-task-3.2.xsd, http://www.springframework.org/schema/beans/spring-beans-3.1.xsd=org/springframework/beans/factory/xml/spring-beans-3.1.xsd, http://www.springframework.org/schema/util/spring-util.xsd=org/springframework/beans/factory/xml/spring-util-3.2.xsd, http://www.springframework.org/schema/aop/spring-aop-3.0.xsd=org/springframework/aop/config/spring-aop-3.0.xsd, http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd=org/springframework/web/servlet/config/spring-mvc-3.0.xsd, http://www.springframework.org/schema/beans/spring-beans.xsd=org/springframework/beans/factory/xml/spring-beans-3.2.xsd, http://www.springframework.org/schema/security/spring-security-2.0.4.xsd=org/springframework/security/config/spring-security-2.0.4.xsd, http://www.springframework.org/schema/lang/spring-lang-3.0.xsd=org/springframework/scripting/config/spring-lang-3.0.xsd, http://www.springframework.org/schema/tx/spring-tx-3.1.xsd=org/springframework/transaction/config/spring-tx-3.1.xsd, http://schemas.xmlsoap.org/wsdl/2003-02-11.xsd=schemas/wsdl/wsdl.xsd, http://www.springframework.org/schema/context/spring-context-2.5.xsd=org/springframework/context/config/spring-context-2.5.xsd, http://cxf.apache.org/schemas/ws/addressing.xsd=schemas/ws-addr-conf.xsd, http://www.springframework.org/schema/tool/spring-tool-3.0.xsd=org/springframework/beans/factory/xml/spring-tool-3.0.xsd, http://www.springframework.org/schema/aop/spring-aop-2.0.xsd=org/springframework/aop/config/spring-aop-2.0.xsd, http://www.springframework.org/schema/jee/spring-jee-3.0.xsd=org/springframework/ejb/config/spring-jee-3.0.xsd, http://www.springframework.org/schema/task/spring-task-3.1.xsd=org/springframework/scheduling/config/spring-task-3.1.xsd, http://www.springframework.org/schema/beans/spring-beans-3.0.xsd=org/springframework/beans/factory/xml/spring-beans-3.0.xsd, http://cxf.apache.org/schemas/wsdl/http-conf.xsd=schemas/wsdl/http-conf.xsd, http://www.springframework.org/schema/jee/spring-jee.xsd=org/springframework/ejb/config/spring-jee-3.2.xsd, http://www.w3.org/2001/xml.xsd=schemas/xml.xsd, http://www.springframework.org/schema/aop/spring-aop-2.5.xsd=org/springframework/aop/config/spring-aop-2.5.xsd, http://www.springframework.org/schema/lang/spring-lang-2.0.xsd=org/springframework/scripting/config/spring-lang-2.0.xsd, http://www.springframework.org/schema/oxm/spring-oxm.xsd=org/springframework/oxm/config/spring-oxm-3.2.xsd, http://www.springframework.org/schema/util/spring-util-3.2.xsd=org/springframework/beans/factory/xml/spring-util-3.2.xsd, http://www.w3.org/2007/02/ws-policy.xsd=schemas/ws-policy-200702.xsd, http://www.springframework.org/schema/task/spring-task.xsd=org/springframework/scheduling/config/spring-task-3.2.xsd, http://www.springframework.org/schema/tool/spring-tool-2.0.xsd=org/springframework/beans/factory/xml/spring-tool-2.0.xsd, http://www.springframework.org/schema/lang/spring-lang-2.5.xsd=org/springframework/scripting/config/spring-lang-2.5.xsd, http://www.springframework.org/schema/tx/spring-tx-3.0.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd, http://cxf.apache.org/schemas/policy.xsd=schemas/policy.xsd, http://schemas.xmlsoap.org/ws/2004/09/policy/ws-policy.xsd=schemas/ws-policy-200409.xsd, http://www.springframework.org/schema/jee/spring-jee-2.0.xsd=org/springframework/ejb/config/spring-jee-2.0.xsd, http://www.springframework.org/schema/oxm/spring-oxm-3.2.xsd=org/springframework/oxm/config/spring-oxm-3.2.xsd, http://www.springframework.org/schema/tool/spring-tool-2.5.xsd=org/springframework/beans/factory/xml/spring-tool-2.5.xsd, http://www.springframework.org/schema/jee/spring-jee-2.5.xsd=org/springframework/ejb/config/spring-jee-2.5.xsd, http://www.springframework.org/schema/security/spring-security-3.1.xsd=org/springframework/security/config/spring-security-3.1.xsd, http://cxf.apache.org/schemas/configuration/cxf-beans.xsd=schemas/configuration/cxf-beans.xsd, http://www.springframework.org/schema/task/spring-task-3.0.xsd=org/springframework/scheduling/config/spring-task-3.0.xsd, http://cxf.apache.org/schemas/core.xsd=schemas/core.xsd, http://www.springframework.org/schema/lang/spring-lang.xsd=org/springframework/scripting/config/spring-lang-3.2.xsd, http://www.springframework.org/schema/context/spring-context-3.2.xsd=org/springframework/context/config/spring-context-3.2.xsd, http://www.springframework.org/schema/util/spring-util-3.1.xsd=org/springframework/beans/factory/xml/spring-util-3.1.xsd, http://www.springframework.org/schema/beans/spring-beans-2.0.xsd=org/springframework/beans/factory/xml/spring-beans-2.0.xsd, http://cxf.apache.org/schemas/configuration/security.xsd=schemas/configuration/security.xsd, http://www.springframework.org/schema/cache/spring-cache.xsd=org/springframework/cache/config/spring-cache-3.2.xsd, http://www.springframework.org/schema/tx/spring-tx.xsd=org/springframework/transaction/config/spring-tx-3.2.xsd, http://cxf.apache.org/schemas/configuration/soap.xsd=schemas/configuration/soap.xsd, http://www.springframework.org/schema/security/spring-security-2.0.2.xsd=org/springframework/security/config/spring-security-2.0.2.xsd, http://www.springframework.org/schema/beans/spring-beans-2.5.xsd=org/springframework/beans/factory/xml/spring-beans-2.5.xsd, http://cxf.apache.org/schemas/jaxws.xsd=schemas/jaxws.xsd, http://www.springframework.org/schema/oxm/spring-oxm-3.1.xsd=org/springframework/oxm/config/spring-oxm-3.1.xsd, http://cxf.apache.org/schemas/simple.xsd=schemas/simple.xsd, http://www.springframework.org/schema/tx/spring-tx-2.0.xsd=org/springframework/transaction/config/spring-tx-2.0.xsd, http://www.springframework.org/schema/security/spring-security.xsd=org/springframework/security/config/spring-security-3.1.xsd, http://www.springframework.org/schema/security/spring-security-3.0.xsd=org/springframework/security/config/spring-security-3.0.xsd, http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd=org/springframework/jdbc/config/spring-jdbc-3.2.xsd, http://www.springframework.org/schema/aop/spring-aop.xsd=org/springframework/aop/config/spring-aop-3.2.xsd}
23:12:42.858 [main] DEBUG o.s.b.f.xml.PluggableSchemaResolver - Found XML schema [http://www.springframework.org/schema/beans/spring-beans-3.2.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-3.2.xsd
23:12:42.890 [main] DEBUG o.s.b.f.x.DefaultBeanDefinitionDocumentReader - Loading bean definitions
23:12:42.898 [main] INFO  o.s.b.f.xml.XmlBeanDefinitionReader - Loading XML bean definitions from class path resource [database/spring-datasource.xml]
23:12:42.899 [main] DEBUG o.s.b.f.xml.DefaultDocumentLoader - Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl]
23:12:42.901 [main] DEBUG o.s.b.f.xml.PluggableSchemaResolver - Found XML schema [http://www.springframework.org/schema/beans/spring-beans-2.5.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-2.5.xsd
23:12:42.911 [main] DEBUG o.s.b.f.x.DefaultBeanDefinitionDocumentReader - Loading bean definitions
.......................

使用 -Dorg.apache.commons.logging.diagnostics.dest=STDOUT 输出

[LogFactory from sun.misc.Launcher$AppClassLoader@26290774] [ENV] Extension directories (java.ext.dir): null
[LogFactory from sun.misc.Launcher$AppClassLoader@26290774] [ENV] Application classpath (java.class.path): C:\eclipse-workspace\workflow\target\classes;C:\eclipse-workspace\idm-authentication-service\target\classes;C:\Users\jsmith\.m2\repository\com\ln\idm\product\idm-product-service\1.0-SNAPSHOT\idm-product-service-1.0-SNAPSHOT.jar;C:\Users\jsmith\.m2\repository\com\ln\idm\service\idm-service\1.0-SNAPSHOT\idm-service-1.0-SNAPSHOT.jar;C:\Users\jsmith\.m2\repository\com\ln\idm\domain\idm-internal-api\1.0-SNAPSHOT\idm-internal-api-1.0-SNAPSHOT.jar;C:\Users\jsmith\.m2\repository\org\apache\cxf\cxf-rt-databinding-xmlbeans\2.7.6\cxf-rt-databinding-xmlbeans-2.7.6.jar;C:\Users\jsmith\.m2\repository\org\apache\cxf\cxf-api\2.7.6\cxf-api-2.7.6.jar;C:\Users\jsmith\.m2\repository\org\codehaus\woodstox\woodstox-core-asl\4.2.0\woodstox-core-asl-4.2.0.jar;C:\Users\jsmith\.m2\repository\wsdl4j\wsdl4j\1.6.3\wsdl4j-1.6.3.jar;C:\Users\jsmith\.m2\repository\org\apache\xmlbeans\xmlbeans\2.6.0\xmlbeans-2.6.0.jar;C:\Users\jsmith\.m2\repository\org\apache\cxf\cxf-rt-core\2.7.6\cxf-rt-core-2.7.6.jar;C:\Users\jsmith\.m2\repository\com\sun\xml\bind\jaxb-impl\2.2.6\jaxb-impl-2.2.6.jar;C:\Users\jsmith\.m2\repository\org\apache\ws\xmlschema\xmlschema-core\2.0.3\xmlschema-core-2.0.3.jar;C:\Users\jsmith\.m2\repository\org\apache\geronimo\specs\geronimo-javamail_1.4_spec\1.7.1\geronimo-javamail_1.4_spec-1.7.1.jar;C:\Users\jsmith\.m2\repository\org\apache\cxf\cxf-rt-frontend-simple\2.7.6\cxf-rt-frontend-simple-2.7.6.jar;C:\Users\jsmith\.m2\repository\org\apache\cxf\cxf-rt-bindings-soap\2.7.6\cxf-rt-bindings-soap-2.7.6.jar;C:\Users\jsmith\.m2\repository\org\apache\cxf\cxf-rt-databinding-jaxb\2.7.6\cxf-rt-databinding-jaxb-2.7.6.jar;C:\Users\jsmith\.m2\repository\org\apache\cxf\cxf-rt-frontend-jaxws\2.7.6\cxf-rt-frontend-jaxws-2.7.6.jar;C:\Users\jsmith\.m2\repository\xml-resolver\xml-resolver\1.2\xml-resolver-1.2.jar;C:\Users\jsmith\.m2\repository\asm\asm\3.3.1\asm-3.3.1.jar;C:\Users\jsmith\.m2\repository\org\apache\cxf\cxf-rt-bindings-xml\2.7.6\cxf-rt-bindings-xml-2.7.6.jar;C:\Users\jsmith\.m2\repository\org\apache\cxf\cxf-rt-ws-addr\2.7.6\cxf-rt-ws-addr-2.7.6.jar;C:\Users\jsmith\.m2\repository\org\apache\cxf\cxf-rt-ws-policy\2.7.6\cxf-rt-ws-policy-2.7.6.jar;C:\Users\jsmith\.m2\repository\org\apache\neethi\neethi\3.0.2\neethi-3.0.2.jar;C:\Users\jsmith\.m2\repository\org\apache\cxf\cxf-rt-transports-http\2.7.6\cxf-rt-transports-http-2.7.6.jar;C:\Users\jsmith\.m2\repository\org\codehaus\woodstox\woodstox-core-lgpl\4.2.0\woodstox-core-lgpl-4.2.0.jar;C:\Users\jsmith\.m2\repository\javax\xml\stream\stax-api\1.0-2\stax-api-1.0-2.jar;C:\Users\jsmith\.m2\repository\org\codehaus\woodstox\stax2-api\3.1.1\stax2-api-3.1.1.jar;C:\Users\jsmith\.m2\repository\org\apache\cxf\cxf-rt-ws-security\2.7.6\cxf-rt-ws-security-2.7.6.jar;C:\Users\jsmith\.m2\repository\net\sf\ehcache\ehcache-core\2.5.1\ehcache-core-2.5.1.jar;C:\Users\jsmith\.m2\repository\org\apache\ws\security\wss4j\1.5.8\wss4j-1.5.8.jar;C:\Users\jsmith\.m2\repository\org\apache\santuario\xmlsec\1.4.3\xmlsec-1.4.3.jar;C:\Users\jsmith\.m2\repository\xalan\xalan\2.7.1\xalan-2.7.1.jar;C:\Users\jsmith\.m2\repository\xalan\serializer\2.7.1\serializer-2.7.1.jar;C:\Users\jsmith\.m2\repository\dom4j\dom4j\1.6.1\dom4j-1.6.1.jar;C:\Users\jsmith\.m2\repository\xml-apis\xml-apis\1.0.b2\xml-apis-1.0.b2.jar;C:\Users\jsmith\.m2\repository\org\springframework\spring-web\3.2.4.RELEASE\spring-web-3.2.4.RELEASE.jar;C:\Users\jsmith\.m2\repository\aopalliance\aopalliance\1.0\aopalliance-1.0.jar;C:\Users\jsmith\.m2\repository\org\springframework\spring-beans\3.2.4.RELEASE\spring-beans-3.2.4.RELEASE.jar;C:\Users\jsmith\.m2\repository\org\springframework\spring-tx\3.2.4.RELEASE\spring-tx-3.2.4.RELEASE.jar;C:\Users\jsmith\.m2\repository\org\springframework\spring-orm\3.2.4.RELEASE\spring-orm-3.2.4.RELEASE.jar;C:\Users\jsmith\.m2\repository\org\springframework\spring-oxm\3.2.4.RELEASE\spring-oxm-3.2.4.RELEASE.jar;C:\Users\jsmith\.m2\repository\org\springframework\spring-test\3.2.4.RELEASE\spring-test-3.2.4.RELEASE.jar;C:\Users\jsmith\.m2\repository\org\springframework\spring-mock\2.0.8\spring-mock-2.0.8.jar;C:\Users\jsmith\.m2\repository\org\springframework\spring-support\2.0.8\spring-support-2.0.8.jar;C:\Users\jsmith\.m2\repository\org\springframework\spring-webmvc\3.2.4.RELEASE\spring-webmvc-3.2.4.RELEASE.jar;C:\Users\jsmith\.m2\repository\org\springframework\spring-aspects\3.2.4.RELEASE\spring-aspects-3.2.4.RELEASE.jar;C:\Users\jsmith\.m2\repository\org\aspectj\aspectjweaver\1.7.2\aspectjweaver-1.7.2.jar;C:\Users\jsmith\.m2\repository\org\springframework\spring-context-support\3.2.4.RELEASE\spring-context-support-3.2.4.RELEASE.jar;C:\Users\jsmith\.m2\repository\org\apache\xbean\xbean-spring\2.8\xbean-spring-2.8.jar;C:\Users\jsmith\.m2\repository\org\springframework\security\spring-security-core\3.1.4.RELEASE\spring-security-core-3.1.4.RELEASE.jar;C:\Users\jsmith\.m2\repository\org\springframework\security\spring-security-web\3.1.4.RELEASE\spring-security-web-3.1.4.RELEASE.jar;C:\Users\jsmith\.m2\repository\org\springframework\security\spring-security-config\3.1.4.RELEASE\spring-security-config-3.1.4.RELEASE.jar;C:\Users\jsmith\.m2\repository\org\springframework\security\spring-security-taglibs\3.1.4.RELEASE\spring-security-taglibs-3.1.4.RELEASE.jar;C:\Users\jsmith\.m2\repository\org\springframework\security\spring-security-acl\3.1.4.RELEASE\spring-security-acl-3.1.4.RELEASE.jar;C:\Users\jsmith\.m2\repository\com\jhlabs\imaging\BLS\imaging-BLS.jar;C:\Users\jsmith\.m2\repository\commons-configuration\commons-configuration\1.6\commons-configuration-1.6.jar;C:\Users\jsmith\.m2\repository\commons-collections\commons-collections\3.2.1\commons-collections-3.2.1.jar;C:\Users\jsmith\.m2\repository\commons-digester\commons-digester\1.8\commons-digester-1.8.jar;C:\Users\jsmith\.m2\repository\commons-beanutils\commons-beanutils\1.7.0\commons-beanutils-1.7.0.jar;C:\Users\jsmith\.m2\repository\commons-beanutils\commons-beanutils-core\1.8.0\commons-beanutils-core-1.8.0.jar;C:\Users\jsmith\.m2\repository\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar;C:\Users\jsmith\.m2\repository\commons-lang\commons-lang\2.3\commons-lang-2.3.jar;C:\Users\jsmith\.m2\repository\org\slf4j\slf4j-api\1.7.5\slf4j-api-1.7.5.jar;C:\Users\jsmith\.m2\repository\org\mockito\mockito-core\1.9.5\mockito-core-1.9.5.jar;C:\Users\jsmith\.m2\repository\org\hamcrest\hamcrest-core\1.1\hamcrest-core-1.1.jar;C:\Users\jsmith\.m2\repository\org\objenesis\objenesis\2.1\objenesis-2.1.jar;C:\Users\jsmith\.m2\repository\org\hamcrest\hamcrest-library\1.3\hamcrest-library-1.3.jar;C:\Users\jsmith\.m2\repository\jaxen\jaxen\1.1.4\jaxen-1.1.4.jar;C:\Users\jsmith\.m2\repository\org\springmodules\spring-modules-jakarta-commons\0.8\spring-modules-jakarta-commons-0.8.jar;C:\Users\jsmith\.m2\repository\commons-validator\commons-validator\1.1.4\commons-validator-1.1.4.jar;C:\Users\jsmith\.m2\repository\commons-chain\commons-chain\1.1\commons-chain-1.1.jar;C:\Users\jsmith\.m2\repository\javax\portlet\portlet-api\1.0\portlet-api-1.0.jar;C:\Users\jsmith\.m2\repository\myfaces\myfaces-api\1.1.0\myfaces-api-1.1.0.jar;C:\Users\jsmith\.m2\repository\commons-codec\commons-codec\1.3\commons-codec-1.3.jar;C:\Users\jsmith\.m2\repository\commons-el\commons-el\1.0\commons-el-1.0.jar;C:\Users\jsmith\.m2\repository\commons-fileupload\commons-fileupload\1.0\commons-fileupload-1.0.jar;C:\Users\jsmith\.m2\repository\oro\oro\2.0.8\oro-2.0.8.jar;C:\Users\jsmith\.m2\repository\javax\servlet\jstl\1.1.2\jstl-1.1.2.jar;C:\Users\jsmith\.m2\repository\org\slf4j\jcl-over-slf4j\1.7.5\jcl-over-slf4j-1.7.5.jar;C:\Users\jsmith\.m2\repository\org\slf4j\jul-to-slf4j\1.7.5\jul-to-slf4j-1.7.5.jar;C:\Users\jsmith\.m2\repository\ch\qos\logback\logback-classic\1.0.13\logback-classic-1.0.13.jar;C:\Users\jsmith\.m2\repository\ch\qos\logback\logback-core\1.0.13\logback-core-1.0.13.jar;C:\Users\jsmith\.m2\repository\ch\qos\logback\logback-access\1.0.13\logback-access-1.0.13.jar;C:\eclipse-workspace\idm-verification-service\target\classes;C:\Users\jsmith\.m2\repository\junit\junit\4.4\junit-4.4.jar;C:\Users\jsmith\.m2\repository\log4j\log4j\1.2.17\log4j-1.2.17.jar;C:\Users\jsmith\.m2\repository\ca\grimoire\log-annotations\1.0\log-annotations-1.0.jar;C:\Users\jsmith\.m2\repository\org\aspectj\aspectjrt\1.6.9\aspectjrt-1.6.9.jar;C:\Users\jsmith\.m2\repository\org\springframework\spring-jdbc\3.2.0.RELEASE\spring-jdbc-3.2.0.RELEASE.jar;C:\Users\jsmith\.m2\repository\org\springframework\spring-core\3.2.0.RELEASE\spring-core-3.2.0.RELEASE.jar;C:\Users\jsmith\.m2\repository\org\springframework\spring-context\3.2.0.RELEASE\spring-context-3.2.0.RELEASE.jar;C:\Users\jsmith\.m2\repository\org\springframework\spring-aop\3.2.0.RELEASE\spring-aop-3.2.0.RELEASE.jar;C:\Users\jsmith\.m2\repository\org\springframework\spring-expression\3.2.0.RELEASE\spring-expression-3.2.0.RELEASE.jar;C:\Users\jsmith\.m2\repository\mysql\mysql-connector-java\5.1.9\mysql-connector-java-5.1.9.jar;C:\Users\jsmith\.m2\repository\com\google\guava\guava\16.0.1\guava-16.0.1.jar;C:\Users\jsmith\.m2\repository\org\apache\commons\commons-lang3\3.2.1\commons-lang3-3.2.1.jar
[LogFactory from sun.misc.Launcher$AppClassLoader@26290774] [ENV] Class org.apache.commons.logging.LogFactory was loaded via classloader sun.misc.Launcher$AppClassLoader@26290774
[LogFactory from sun.misc.Launcher$AppClassLoader@26290774] [ENV] Ancestry of classloader which loaded org.apache.commons.logging.LogFactory is sun.misc.Launcher$AppClassLoader@26290774 == 'sun.misc.Launcher$AppClassLoader@1912a56'
[LogFactory from sun.misc.Launcher$AppClassLoader@26290774] [ENV] Ancestry of classloader which loaded org.apache.commons.logging.LogFactory is ClassLoader tree:sun.misc.Launcher$AppClassLoader@26290774 (SYSTEM)  --> sun.misc.Launcher$ExtClassLoader@24291903 --> BOOT
[LogFactory from sun.misc.Launcher$AppClassLoader@26290774] BOOTSTRAP COMPLETED
[LogFactory from sun.misc.Launcher$AppClassLoader@26290774] [LOOKUP] LogFactory implementation requested for the first time for context classloader sun.misc.Launcher$AppClassLoader@26290774
[LogFactory from sun.misc.Launcher$AppClassLoader@26290774] [LOOKUP] sun.misc.Launcher$AppClassLoader@26290774 == 'sun.misc.Launcher$AppClassLoader@1912a56'
[LogFactory from sun.misc.Launcher$AppClassLoader@26290774] [LOOKUP] ClassLoader tree:sun.misc.Launcher$AppClassLoader@26290774 (SYSTEM)  --> sun.misc.Launcher$ExtClassLoader@24291903 --> BOOT
[LogFactory from sun.misc.Launcher$AppClassLoader@26290774] [LOOKUP] No properties file of name 'commons-logging.properties' found.
[LogFactory from sun.misc.Launcher$AppClassLoader@26290774] [LOOKUP] Looking for system property [org.apache.commons.logging.LogFactory] to define the LogFactory subclass to use...
[LogFactory from sun.misc.Launcher$AppClassLoader@26290774] [LOOKUP] No system property [org.apache.commons.logging.LogFactory] defined.
[LogFactory from sun.misc.Launcher$AppClassLoader@26290774] [LOOKUP] Looking for a resource file of name [META-INF/services/org.apache.commons.logging.LogFactory] to define the LogFactory subclass to use...
[LogFactory from sun.misc.Launcher$AppClassLoader@26290774] [LOOKUP]  Creating an instance of LogFactory class org.apache.commons.logging.impl.SLF4JLogFactory as specified by file 'META-INF/services/org.apache.commons.logging.LogFactory' which was present in the path of the context classloader.
[LogFactory from sun.misc.Launcher$AppClassLoader@26290774] Loaded class org.apache.commons.logging.impl.SLF4JLogFactory from classloader sun.misc.Launcher$AppClassLoader@26290774
[LogFactory from sun.misc.Launcher$AppClassLoader@26290774] Created object org.apache.commons.logging.impl.SLF4JLogFactory@14185653 to manage classloader sun.misc.Launcher$AppClassLoader@26290774
09:55:35.705 [main] DEBUG o.s.core.env.StandardEnvironment - Initializing new StandardEnvironment
09:55:35.710 [main] DEBUG o.s.core.env.StandardEnvironment - Adding [systemProperties] PropertySource with lowest search precedence
09:55:35.711 [main] DEBUG o.s.core.env.StandardEnvironment - Adding [systemEnvironment] PropertySource with lowest search precedence
09:55:35.711 [main] DEBUG o.s.core.env.StandardEnvironment - Initialized StandardEnvironment with PropertySources [systemProperties,systemEnvironment]
09:55:35.714 [main] INFO  o.s.c.s.ClassPathXmlApplicationContext - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@1d7999e: startup date [Fri Feb 14 09:55:35 EST 2014]; root of context hierarchy

弹簧用途commons-logging它自动检测要使用的日志框架。有多种方法可以调整哪个日志框架 http://commons.apache.org/proper/commons-logging/guide.html#Configuration将被选择,所以首先要做的就是确保commons-logging绑定到 log4j。

为此,请使用附加标志启动您的应用程序-Dorg.apache.commons.logging.diagnostics.dest=STDOUT这将输出发现过程的结果。

公共日志委托给 log4j

您现在需要确保 log4j 使用预期的配置进行初始化。默认情况下,log4j 搜索log4j.xml文件位于类路径的根目录并回退到log4j.properties如果没有找到。您正在使用的库之一可能(错误地)有一个log4j.xml文件在根目录下。

要调试 log4j,请使用附加标志再次运行应用程序-Dlog4j.debug=true。这将输出准确的记录器和配置文件的位置。

commons-logging 不委托给 log4j

If commons-logging不委托给 log4j,这意味着涉及另一个日志框架。最常见的情况是您的应用程序附带jcl-over-slf4j.jar, a 直接替换 http://www.slf4j.org/legacy.html of commons-logging使用slf4j在幕后。

在这种情况下,Spring 使用commons-logging配置为委托给slf4j。所以,本质上,Spring正在使用slf4j. But slf4j 是一个简单的日志门面 http://www.slf4j.org/和需要绑定 http://www.slf4j.org/manual.html到实际的框架。

SINCE 1.6.0 如果在类路径上找不到绑定,则 SLF4J 将默认为无操作实现。

一旦你找到了绑定库(它可能是logback or log4j例如),检查日志框架的配置slf4j一定会。

在这种特殊情况下,您可能有logback在你的类路径中。因为它是一个纯粹的实现slf4j,它不需要绑定库,如果没有提供配置文件,它会登录调试,这实际上符合你的问题。要解决您的问题,请从依赖项中排除 logback 并添加slf4j-log4j12使用 log4j 配置 slf4j。


Edit:更新了各种评论

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何禁用 Spring 日志记录 DEBUG 消息? 的相关文章

  • Spring Boot data-jpa 和 nativeQuery Postgres 转换

    我有一个习惯 Query在一个看起来像这样的存储库中 SELECT FROM topicaudit c14001 WHERE auditdate gt NOW AND auditdate lt NOW 1 hour INTERVAL AND
  • Java OR 运算符优先级

    如何在 Java 中以 if 的方式链接条件语句b是假的 不如不检查c If a and c是假的 并且b是真的 确实c会被检查吗 if a b c 我正在寻找 PHP 所拥有的类似功能 但两者之间存在差异OR and 爪哇 如果左操作数是
  • IDEA:javac:源版本1.7需要目标版本1.7

    使用 IntelliJ IDEA 运行 JUnit 测试时 我得到 我该如何纠正这个问题 使用SDK 1 7 模块语言级别为1 7 Maven 构建工作正常 这就是为什么我相信IDEA配置问题 您很可能在此处从 Maven 导入了不正确的编
  • Java 中内存高效的稀疏数组

    关于时间高效的稀疏数组存在一些问题 但我正在寻找内存效率 我需要相当于List
  • 在所有方法调用上允许类型见证有什么意义?

    假设我们有两种方法 如下所示 public static
  • 一起使用 String 和 int 时的 System.out.println 行为 [重复]

    这个问题在这里已经有答案了 考虑下面的代码片段 public class Student public static void main String args int a 3 int b 4 System out println a b
  • Jackson 中没有注释的多态反序列化

    我有一个CloudEvent
  • Hibernate SET 元素 order-by 子句

    我想知道 我可以平静地接受以下事实 当 fetch select 时 您可以在映射文件中的 SET 元素上设置 order by 属性 但如果您在创建查询时获取所有内容 这样安全吗 我的意思是 他们将结果放入 HashSet 中 我不认为这
  • 使用 JPA 存储库保留 Spring Batch ItemWriter 的问题

    我对春季批次有疑问ItemWriter它依赖于 JPA 存储库来更新数据 这里是 Component public class MessagesDigestMailerItemWriter implements ItemWriter
  • JS 中的 .Jar 文件

    有谁知道如何在 JS 中访问 jar 文件 我已经用 Java 创建了类并作为 jar 文件导入 我想从 JS 文件访问该类 大家好 我感谢你们所有人 我尝试在 Firefox XUL 中使用 JS 列出文件夹中的文件 但我做不到 然后我决
  • 在大画布上滚动

    我需要一些帮助来了解滚动绘制到 Android 画布上的项目的基础知识 假设我想创建一个时间线 其中 0 处的时间是可视化的顶部 并且随着时间的增加 时间线继续呈现在上一个点下方 如果我想在 Android 上渲染它 我知道我可以通过重写
  • 使用 Spark SQL 时找不到 Spark Logging 类

    我正在尝试用 Java 进行简单的 Spark SQL 编程 在程序中 我从 Cassandra 表获取数据 将RDD into a Dataset并显示数据 当我运行spark submit命令 我收到错误 java lang Class
  • 如何使用JSqlParser向sql添加where条件?

    我想用JSqlParser向sql添加where条件 例如 Before select from test table where a 1 group by c After select from test table where a 1
  • 从 Brixton.RC1 开始的 ZuulProxy 未传递授权标头

    从 Spring Cloud 切换时Brixton M5 to Brixton RC1我的 ZuulProxy 不再通过Authorization标头下游到我的代理服务 我的设置中有各种各样的角色 但大多数都相当简单 Authorizati
  • 自动将通配符导入重构为 IntelliJ 中的显式导入(适用于 Scala/Java)

    考虑下面的代码 是否可以让 IntelliJ 自动将每个通配符导入重构为显式导入 无论范围内使用什么 例如import scalatags JsDom all into import scalatags JsDom all ol li di
  • 如果垃圾收集器没有删除未引用的对象,它们还能运行吗?

    如果一个对象正在等待垃圾收集 但包含一个在该对象的最后一个引用更改时正在运行的线程 那么该线程是否仍会运行并且代码是否仍会执行 那么您是否可能有一堆应该删除的幽灵对象 但它们对您的代码产生了影响 你如何防止这种情况发生 有没有办法让对象知道
  • 在Java中将32bpp图像转换为16bpp图像

    如何使用 Java 库将 32bpp 图像 ARGB 转换为 16bpp 图像 ARGB 出于我的好奇 在像素级别 这种转换有什么作用 如果我有一个保存像素值 包含所有通道 的 int 值 那么在转换发生后该 int 会有什么不同 32 位
  • Swing:如何创建事件并将其分派给组件?

    我需要将一些事件发送到 Swing 中的组件 因此它的处理方式就像任何用户生成的标准 Swing 事件一样 基本上 类似于宏记录器 然后是 JEditorPane 的执行器 但我需要对生成的事件有更多的控制 所以 假设我有一个编辑 我想 捕
  • 如何在Java中添加两个“卡”的值?

    我正在开发一个项目来模拟二十一点游戏中的第一笔交易 到目前为止 程序创建了两张随机等级 ACE 到 KING 和随机花色的牌 我正在努力创建一个切换表或 if else 梯形图 将两张卡的附加值分配为可变分数 下面的代码从概念上代表了我想要
  • java 更新进度条

    我有一个 JFrame 和以下组件 JButton jButton1 Progress Bar ProgressBar 及其公共静态 JLabel 状态及其公共静态 单击按钮时会执行不同的语句 我想在每个语句后更新我的进度条 这是我的代码

随机推荐

  • 在 HTML 中设置 LI 标记的值

    我有一个有序列表 我需要为其设置 值 就像是 ol li apple li li pear li li car li ol 这样它们就会显示我分配的数字 34 apple 45 pear 55 car 有没有办法告诉 LI 应显示什么数字
  • 无法使用服务帐户查询 Google Search Console API

    我需要使用服务帐户从 Google Search Console 网站管理员工具 检索一些数据 到目前为止我已经能够检索到access token对于我需要附加到请求的 url 的服务帐户 问题是我找不到办法这样做 这是我正在使用的代码 f
  • C# 和泛型 - 为什么调用基类中的方法而不是派生类中的新方法?

    如果泛型类型参数 调用类或调用方法的 受以下约束where T Base不会调用 T Derived 中的新方法 而是调用 Base 中的方法 为什么类型 T 在方法调用中被忽略 即使它应该在运行时之前已知 Update 但是 当约束使用像
  • 自定义字体,eot,不起作用

    我无法让我的自定义字体在 IE7 和 IE8 中工作 http i creative dk iJob http i creative dk iJob 它在 IE9 Firefox 和 Chrome 中运行良好 对于 Firefox 和 Ch
  • 每当调用 malloc/free 时输出到 stderr

    使用 Linux GCC C 每当调用 malloc free new delete 时 我想向 stderr 记录一些内容 我试图了解库的内存分配 因此我想在运行单元测试时生成此输出 我使用 valgrind 进行内存泄漏检测 但我找不到
  • 我的 rtk 切片的初始状态未按预期保存在存储中?

    目前正在学习如何将 RTK 与 typescript 结合使用 我有 2 个切片 其中一个是我使用 RTK 查询制作的以获取数据 称为apiSlice ts 另一个使用 createSlice 来处理我的待办事项应用程序的同步状态更改 称为
  • 在 MATLAB 中将数据拟合到 B 样条

    我正在尝试估计矩阵形式的时间序列数据中的缺失值 列代表时间点 即现在 我想将矩阵的每一行拟合到 B 样条曲线 并用它来估计缺失值 我可以使用 MATLAB 将数据拟合到普通样条曲线 但我完全陷入尝试找出如何拟合数据以创建 B 样条曲线的困境
  • Android:如何获取设备的真实屏幕尺寸?

    我尝试了不同的方法来获取设备的屏幕尺寸 但它总是返回错误的尺寸 791x480代替854x480 可能是导航栏的原因 我的设备当前运行的是 JellyBean 4 1 1 I tried Display display getWindowM
  • OSGI - 处理捆绑包所需的第 3 方 JAR

    我刚刚开始 OSGI 开发 正在努力了解如何最好地处理依赖的 JAR 也就是说 如果我要创建一个捆绑包 我很可能需要使用一些第 3 方 JAR 当我创建要部署到 OSGI 的捆绑包 JAR 时 显然不包含这些第 3 方 JAR 因此该捆绑包
  • event.getSource() 返回 null android 中的可访问性

    我尝试使用 DashLane 等辅助服务或其他一些使用辅助服务的应用程序来填充 EditText 字段 我正在使用聚焦事件视图 当 EditText 获得焦点时 事件开始但是getSource 返回空值 Code Accessibility
  • 奇怪的 JavaCore IType 缓存问题

    我正在开发一个插件 它接受工作区中实现某些接口 IDomain 的所有枚举 解析代码 使用 AST 对枚举进行一些修改 并将其标记为使用注释 IDomainInfo 进行处理 例如 它需要这样的东西 public enum SomeEnum
  • conda 环境中 conda 和 pip 安装的区别

    我似乎经常问自己这个问题 最近改用 conda 环境 Anaconda 但我最终用谷歌搜索并没有走得太远 我现在在自己的 conda 环境中运行所有项目 因为我喜欢将所有内容保持独立 并尽可能减少对其他程序的依赖 比如最近的一个环境 con
  • Facebook Analytics:使用图形 API 的用户属性和记录事件

    我有 facebook 应用程序 Messenger Bot 应用程序 我使用图形 API 端点记录每个用户的自定义事件 申请 活动 事件被完美记录 我想要做的是为我的信使机器人用户创建自定义属性 以便我可以使用此属性对应用程序数据进行分段
  • 在 Android 中处理多个回收器视图 [Kotlin]

    我遇到过这样的情况 一个布局上有 3 个 RecyclerView 他们以某种方式相互依赖 数据来自房间数据库 问题原型 问题陈述 假设您有类似 Floor1 Floor2 Floor3 等 的楼层 并且每个楼层内都有类似 Room1 Ro
  • HTMLAgilityPack 中的 XPath 选择无法按预期工作

    我正在用 C 编写简单的屏幕抓取程序 为此我需要选择放置在一个名为 aspnetForm 的单个表单内的所有输入 页面上有 2 个表单 我不希望来自另一个表单的输入 并且此表单中的所有输入都放置在不同的表 div 中 或者仅放置在该表单的第
  • GHC 可以为 monad 转换器派生 Functor 和 Applicative 实例吗?

    我正在尝试实施MaybeT本着mtl图书馆 使用这个非编译解决方案 LANGUAGE FlexibleInstances MultiParamTypeClasses UndecidableInstances import Control M
  • 如何使用 NumPy/SciPy 进行简单的高斯混合采样和 PDF 绘图?

    我添加三个正态分布以获得一个新的分布 如下所示 如何在python中根据这个分布进行采样 import matplotlib pyplot as plt import scipy stats as ss import numpy as np
  • UITextView 放入 UITableViewCell 时有时不显示内容

    我想知道是否还有其他人面临同样的问题 我有一个 UITextView 字段放置在 UITableViewCell 中 有时它不显示文本 当我单击或滚动表格视图时 它就会出现 有什么猜测吗 Details 我调用一个方法viewDidLoad
  • 如何创建不在 ScrollView 中或已禁用 ScrollView 的 ListView?

    我想要 ListView 中的一些好东西 例如能够使用 ListAdapter 和项目选择等 但我不想要其中的 ScrollView 部分 我想以不同的方式自己实现该部分 为什么或如何做到这一点并不是这个问题的重点 所以请不要问 为什么 有
  • 如何禁用 Spring 日志记录 DEBUG 消息?

    我正在开发一个简单的桌面应用程序 不是网络应用程序 这是我的log4j properties log4j rootCategory INFO stdout log4j appender stdout org apache log4j Con