Это то, что я никогда не понимал полностью, интересно, может ли кто-нибудь объяснить это?
У меня есть весеннее приложение, использующее спящий режим. Иногда я запускаю его на коте, иногда на пристани. Я получаю вывод журнала из спящего режима и весны в порядке. Я понимаю, что есть несколько вариантов ведения журнала java, например java.logging, slf4j, log4j и т. д.; но на самом деле вообще не занимался настройкой ведения журнала. Теперь, когда я хочу настроить вывод журнала ehcache, мне нужно!
Мой вопрос в том, как в моем приложении узнать, какой тип ведения журнала он использует, и как его настроить и настроить? Это зависит от сервера приложений? Или это spring или hibernate, который использует собственную реализацию ведения журнала. Просматривая мое дерево зависимостей maven, я вижу, что hibernate-validator извлекает org.jboss.logging, и для этой весны требуется регистрация общих ресурсов. У меня также есть slf4j, потому что для нескольких пакетов требуются разные его версии, поэтому я вручную установил последнюю версию.
Зависимости Maven:
[INFO] +- org.hibernate:hibernate-core:jar:3.6.10.Final:compile
[INFO] | +- antlr:antlr:jar:2.7.6:compile
[INFO] | +- commons-collections:commons-collections:jar:3.1:compile
[INFO] | +- dom4j:dom4j:jar:1.6.1:compile
[INFO] | +- org.hibernate:hibernate-commons-annotations:jar:3.2.0.Final:compile
[INFO] | +- org.hibernate.javax.persistence:hibernate-jpa-2.0-api:jar:1.0.1.Final:compile
[INFO] | \- javax.transaction:jta:jar:1.1:compile
[INFO] +- org.hibernate:hibernate-c3p0:jar:3.6.10.Final:compile
[INFO] | \- c3p0:c3p0:jar:0.9.1:compile
[INFO] +- org.slf4j:slf4j-api:jar:1.5.8:compile
[INFO] +- org.slf4j:jcl-over-slf4j:jar:1.5.8:compile
[INFO] +- org.slf4j:slf4j-simple:jar:1.5.8:compile
[INFO] +- net.sf.ehcache:ehcache-core:jar:2.6.6:compile
[INFO] +- xerces:xercesImpl:jar:2.10.0:compile
[INFO] | \- xml-apis:xml-apis:jar:1.4.01:compile
[INFO] +- com.vividsolutions:jts:jar:1.13:compile
[INFO] +- org.hibernatespatial:hibernate-spatial-postgis:jar:1.1:compile
[INFO] | \- org.hibernatespatial:hibernate-spatial:jar:1.1:compile
[INFO] +- postgresql:postgresql:jar:9.1-901-1.jdbc4:compile
[INFO] +- org.postgis:postgis-jdbc:jar:1.3.3:compile
[INFO] | \- org.postgis:postgis-stubs:jar:1.3.3:compile
[INFO] +- org.springframework:spring-expression:jar:3.1.2.RELEASE:compile
[INFO] | \- org.springframework:spring-core:jar:3.1.2.RELEASE:compile
[INFO] | \- commons-logging:commons-logging:jar:1.1.1:compile
[INFO] +- org.springframework:spring-beans:jar:3.1.2.RELEASE:compile
[INFO] +- org.springframework:spring-aop:jar:3.1.2.RELEASE:compile
[INFO] | \- aopalliance:aopalliance:jar:1.0:compile
[INFO] +- org.springframework:spring-context:jar:3.1.2.RELEASE:compile
[INFO] +- org.springframework:spring-context-support:jar:3.1.2.RELEASE:compile
[INFO] +- org.springframework:spring-tx:jar:3.1.2.RELEASE:compile
[INFO] +- org.springframework:spring-jdbc:jar:3.1.2.RELEASE:compile
[INFO] +- org.springframework:spring-orm:jar:3.1.2.RELEASE:compile
[INFO] +- org.springframework:spring-oxm:jar:3.1.2.RELEASE:compile
[INFO] | \- commons-lang:commons-lang:jar:2.5:compile
[INFO] +- org.springframework:spring-web:jar:3.1.2.RELEASE:compile
[INFO] +- org.springframework:spring-webmvc:jar:3.1.2.RELEASE:compile
[INFO] +- org.springframework:spring-aspects:jar:3.1.2.RELEASE:compile
[INFO] +- org.springframework:spring-instrument:jar:3.1.2.RELEASE:compile
[INFO] +- org.springframework:spring-instrument-tomcat:jar:3.1.2.RELEASE:compile
[INFO] +- org.springframework:spring-jms:jar:3.1.2.RELEASE:compile
[INFO] +- org.springframework:spring-asm:jar:3.1.4.RELEASE:compile
[INFO] +- org.aspectj:aspectjrt:jar:1.7.1:compile
[INFO] +- org.aspectj:aspectjweaver:jar:1.7.1:compile
[INFO] +- cglib:cglib:jar:2.2.2:compile
[INFO] | \- asm:asm:jar:3.3.1:compile
[INFO] +- org.springframework.security:spring-security-core:jar:3.1.3.RELEASE:compile
[INFO] +- org.springframework.security:spring-security-web:jar:3.1.3.RELEASE:compile
[INFO] +- org.springframework.security:spring-security-config:jar:3.1.3.RELEASE:compile
[INFO] +- org.springframework.security:spring-security-aspects:jar:3.1.3.RELEASE:compile
[INFO] +- org.springframework.security:spring-security-taglibs:jar:3.1.3.RELEASE:compile
[INFO] | \- org.springframework.security:spring-security-acl:jar:3.1.3.RELEASE:compile
[INFO] +- org.springframework.security:spring-security-crypto:jar:3.1.3.RELEASE:compile
[INFO] +- org.hibernate:hibernate-validator:jar:4.3.1.Final:compile
[INFO] | +- javax.validation:validation-api:jar:1.0.0.GA:compile
[INFO] | \- org.jboss.logging:jboss-logging:jar:3.1.0.CR2:compile
[INFO] +- org.hibernate:hibernate-validator-annotation-processor:jar:4.3.1.Final:compile
[INFO] +- com.fasterxml.jackson.core:jackson-core:jar:2.1.1:compile
[INFO] +- com.fasterxml.jackson.core:jackson-databind:jar:2.1.1:compile
[INFO] +- com.fasterxml.jackson.core:jackson-annotations:jar:2.1.1:compile
[INFO] +- org.apache.velocity:velocity:jar:1.7:compile
[INFO] +- joda-time:joda-time:jar:2.1:compile
[INFO] +- javax.mail:mail:jar:1.4.5:compile
[INFO] | \- javax.activation:activation:jar:1.1:compile
[INFO] +- jstl:jstl:jar:1.2:compile
[INFO] +- javaxt:javaxt-core:jar:1.5.10:compile
[INFO] +- commons-fileupload:commons-fileupload:jar:1.2.2:compile
[INFO] +- commons-io:commons-io:jar:2.4:compile
[INFO] +- org.springframework:spring-test:jar:3.1.2.RELEASE:test
[INFO] +- junit:junit:jar:4.11:test
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.mockito:mockito-all:jar:1.9.5:test
[INFO] +- org.glassfish:javax.servlet:jar:3.0:test
[INFO] +- javax:javaee-web-api:jar:6.0:provided
[INFO] \- javassist:javassist:jar:3.12.1.GA:compile
Привет, НВФ