Spring Boot 2.0.3和Hibernate JPA NoSuchMethodError:org.jboss.logging.Logger.debugf(Ljava / lang / String; I)V

时间:2018-08-06 07:42:37

标签: hibernate spring-boot spring-data-jpa

我用最新的稳定版本创建了一个新的spring boot项目,但是需要包括envers等一些其他内容。没有envers,该项目将无法编译。我尝试使用不同版本的Hibernate(4和5)和JBoss'jboss-logmanager(具有版本2和3)进行测试,但不幸的是,它始终会给出java.lang.NoSuchMethodError:org.jboss.logging.Logger.debugf(Ljava / lang / String; I)V

似乎Hibernate 4和Hibernate 5都依赖JBoss日志记录,而JBoss日志记录2和3都没有具有上述签名的方法。我的应用程序通过Spring Boot部署在内置的Tomcat中。

这是我的执行日志:

Executing: gradle :run
Arguments: [-PcmdLineArgs=, -PjvmLineArgs=, -c, /home/naveed/data/work/projects/browngrid/bunnycrm/tech_upgrade/bunnycrm/source/server-java/settings.gradle]

:compileJava UP-TO-DATE
:processResources UP-TO-DATE
:classes UP-TO-DATE
:run

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v2.0.3.RELEASE)

2018-08-05 23:53:31.926  INFO 3582 --- [           main] c.b.bunnycrm.SampleDataJpaApplication    : Starting SampleDataJpaApplication on naveed-Lenovo-Z70-80 with PID 3582 (/home/naveed/data/work/projects/browngrid/bunnycrm/tech_upgrade/bunnycrm/source/server-java/build/classes/java/main started by naveed in /home/naveed/data/work/projects/browngrid/bunnycrm/tech_upgrade/bunnycrm/source/server-java)
2018-08-05 23:53:31.933  INFO 3582 --- [           main] c.b.bunnycrm.SampleDataJpaApplication    : No active profile set, falling back to default profiles: default
2018-08-05 23:53:32.089  INFO 3582 --- [           main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@3b69e7d1: startup date [Sun Aug 05 23:53:32 CEST 2018]; root of context hierarchy
2018-08-05 23:53:37.717  INFO 3582 --- [           main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.amqp.rabbit.annotation.RabbitBootstrapConfiguration' of type [org.springframework.amqp.rabbit.annotation.RabbitBootstrapConfiguration$$EnhancerBySpringCGLIB$$791aa5b1] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2018-08-05 23:53:38.542  INFO 3582 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 9996 (http)
2018-08-05 23:53:38.613  INFO 3582 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2018-08-05 23:53:38.614  INFO 3582 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet Engine: Apache Tomcat/8.5.31
2018-08-05 23:53:38.642  INFO 3582 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener   : The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/lib/jvm/java-8-oracle/jre/lib/amd64:/usr/lib/jvm/java-8-oracle/jre/lib/i386::/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib]
2018-08-05 23:53:38.925  INFO 3582 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2018-08-05 23:53:38.925  INFO 3582 --- [ost-startStop-1] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 6839 ms
2018-08-05 23:53:39.091  INFO 3582 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean   : Mapping filter: 'characterEncodingFilter' to: [/*]
2018-08-05 23:53:39.092  INFO 3582 --- [ost-startStop-1] .s.DelegatingFilterProxyRegistrationBean : Mapping filter: 'springSecurityFilterChain' to: [/*]
2018-08-05 23:53:39.511  INFO 3582 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Starting...
Sun Aug 05 23:53:39 CEST 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
2018-08-05 23:53:39.850  INFO 3582 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Start completed.
Sun Aug 05 23:53:39 CEST 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Sun Aug 05 23:53:39 CEST 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Sun Aug 05 23:53:39 CEST 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Sun Aug 05 23:53:39 CEST 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Sun Aug 05 23:53:39 CEST 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Sun Aug 05 23:53:40 CEST 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Sun Aug 05 23:53:40 CEST 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Sun Aug 05 23:53:40 CEST 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
Sun Aug 05 23:53:40 CEST 2018 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
2018-08-05 23:53:40.228  INFO 3582 --- [           main] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default'
2018-08-05 23:53:40.272  INFO 3582 --- [           main] o.hibernate.jpa.internal.util.LogHelper  : HHH000204: Processing PersistenceUnitInfo [
    name: default
    ...]
2018-08-05 23:53:40.408  INFO 3582 --- [           main] org.hibernate.Version                    : HHH000412: Hibernate Core {5.3.4.Final}
2018-08-05 23:53:40.412  INFO 3582 --- [           main] org.hibernate.cfg.Environment            : HHH000206: hibernate.properties not found
2018-08-05 23:53:40.579  INFO 3582 --- [           main] o.hibernate.annotations.common.Version   : HCANN000001: Hibernate Commons Annotations {5.0.4.Final}
2018-08-05 23:53:41.029  INFO 3582 --- [           main] org.hibernate.dialect.Dialect            : HHH000400: Using dialect: org.hibernate.dialect.MySQL5Dialect
2018-08-05 23:53:41.125  INFO 3582 --- [           main] o.h.e.boot.internal.EnversServiceImpl    : Envers integration enabled? : true
2018-08-05 23:53:50.720  WARN 3582 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.jboss.logging.Logger.debugf(Ljava/lang/String;I)V
2018-08-05 23:53:50.721  INFO 3582 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown initiated...
2018-08-05 23:53:50.730  INFO 3582 --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown completed.
2018-08-05 23:53:50.735  INFO 3582 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2018-08-05 23:53:50.781  INFO 3582 --- [           main] ConditionEvaluationReportLoggingListener : 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2018-08-05 23:53:50.792 ERROR 3582 --- [           main] o.s.boot.SpringApplication               : Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.jboss.logging.Logger.debugf(Ljava/lang/String;I)V
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1708) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:581) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:503) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1089) ~[spring-context-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:859) ~[spring-context-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.0.3.RELEASE.jar:2.0.3.RELEASE]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-2.0.3.RELEASE.jar:2.0.3.RELEASE]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:395) [spring-boot-2.0.3.RELEASE.jar:2.0.3.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.3.RELEASE.jar:2.0.3.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1255) [spring-boot-2.0.3.RELEASE.jar:2.0.3.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1243) [spring-boot-2.0.3.RELEASE.jar:2.0.3.RELEASE]
    at com.browngrid.bunnycrm.SampleDataJpaApplication.main(SampleDataJpaApplication.java:12) [main/:na]
Caused by: java.lang.NoSuchMethodError: org.jboss.logging.Logger.debugf(Ljava/lang/String;I)V
    at org.hibernate.query.spi.NamedQueryRepository.checkNamedQueries(NamedQueryRepository.java:151) ~[hibernate-core-5.3.4.Final.jar:5.3.4.Final]
    at org.hibernate.internal.SessionFactoryImpl.checkNamedQueries(SessionFactoryImpl.java:574) ~[hibernate-core-5.3.4.Final.jar:5.3.4.Final]
    at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:321) ~[hibernate-core-5.3.4.Final.jar:5.3.4.Final]
    at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:467) ~[hibernate-core-5.3.4.Final.jar:5.3.4.Final]
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:939) ~[hibernate-core-5.3.4.Final.jar:5.3.4.Final]
    at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:57) ~[spring-orm-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:365) ~[spring-orm-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:390) ~[spring-orm-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:377) ~[spring-orm-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:341) ~[spring-orm-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1767) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1704) ~[spring-beans-5.0.7.RELEASE.jar:5.0.7.RELEASE]
    ... 16 common frames omitted

:run FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':run'.
> Process 'command '/usr/lib/jvm/java-8-oracle/bin/java'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 21s
3 actionable tasks: 1 executed, 2 up-to-date



Build failure (see the Notifications window for stacktrace): gradle :run

这是gradle.build文件

buildscript {
    ext {
        springBootVersion = '2.0.3.RELEASE'
    }
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
    }
}

apply plugin: 'application'
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'

group = 'com.browngrid'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8

repositories {
    mavenCentral()
}


ext {
    springBootAdminVersion = '2.0.1'
}

mainClassName = 'com.browngrid.bunnycrm.SampleDataJpaApplication'

if (!hasProperty('mainClass')) {
    ext.mainClass = 'com.browngrid.bunnycrm.SampleDataJpaApplication'
}

repositories {
    mavenCentral()
    maven { url "https://dl.bintray.com/caarmen/maven/" }
}

dependencies {
    compile fileTree(dir: 'lib', include: '*.jar')
    runtime fileTree(dir: 'lib', include: '*.jar')

    compile "junit:junit:4.11"

    compile('org.springframework.boot:spring-boot-starter-amqp')
    compile('org.springframework.boot:spring-boot-starter-aop')
    compile('org.springframework.boot:spring-boot-starter-batch') 
    compile('org.springframework.boot:spring-boot-starter-data-jpa'){
        exclude group: 'org.jboss.logging'
    } 
    compile('org.springframework.boot:spring-boot-starter-freemarker')

    compile('org.springframework.boot:spring-boot-starter-mail')
    compile('org.springframework.boot:spring-boot-starter-security')

    runtime('mysql:mysql-connector-java')

    testCompile('org.springframework.boot:spring-boot-starter-test')

    compile("org.springframework.boot:spring-boot-starter-tomcat")

    //hibernate
    //    compile 'org.hibernate.common:hibernate-commons-annotations:4.0.4.Final'
    // https://mvnrepository.com/artifact/org.hibernate/hibernate-core
    //    compile group: 'org.hibernate', name: 'hibernate-core', version: '5.3.4.Final'

    //    compile 'org.hibernate:hibernate-entitymanager:5.1.0.Final'
    // https://mvnrepository.com/artifact/org.hibernate/hibernate-entitymanager
    //    compile group: 'org.hibernate', name: 'hibernate-entitymanager', version: '5.3.4.Final'






    // https://mvnrepository.com/artifact/org.hibernate/hibernate-core
    compile group: 'org.hibernate', name: 'hibernate-core', version: '5.3.4.Final'

    // https://mvnrepository.com/artifact/org.hibernate/hibernate-entitymanager
    compile group: 'org.hibernate', name: 'hibernate-entitymanager', version: '5.3.4.Final'

    //    compile 'org.hibernate:hibernate-jpamodelgen:5.1.0.Final'
    //    compile 'org.hibernate:hibernate-validator:4.3.2.Final'
    // https://mvnrepository.com/artifact/org.springframework/spring-orm
    compile group: 'org.springframework', name: 'spring-orm', version: '5.0.8.RELEASE'
    // https://mvnrepository.com/artifact/org.jboss.logging/jboss-logging
    //    compile group: 'org.jboss.logging', name: 'jboss-logging', version: '3.3.2.Final'
    // https://mvnrepository.com/artifact/org.jboss.logmanager/jboss-logmanager
    testCompile group: 'org.jboss.logmanager', name: 'jboss-logmanager', version: '2.1.4.Final'

    // https://mvnrepository.com/artifact/org.hibernate/hibernate-envers
    compile group: 'org.hibernate', name: 'hibernate-envers', version: '5.3.4.Final'
    // https://mvnrepository.com/artifact/org.hibernate.javax.persistence/hibernate-jpa-2.1-api
    //    compile group: 'org.hibernate.javax.persistence', name: 'hibernate-jpa-2.1-api', version: '1.0.2.Final'

    //log4j
    compile 'org.apache.logging.log4j:log4j-core:2.5'
    compile 'org.apache.logging.log4j:log4j-web:2.5'

    //apache commons
    compile 'org.apache.commons:commons-collections4:4.1'
    compile 'org.apache.commons:commons-email:1.4'
    compile 'org.apache.commons:commons-io:1.3.2'
    compile 'org.apache.commons:commons-lang3:3.0'
    compile 'org.apache.commons:commons-math3:3.6'

    //commons
    compile 'commons-beanutils:commons-beanutils:1.9.2'
    compile 'commons-codec:commons-codec:1.10'
    compile 'commons-digester:commons-digester:2.1'
    compile 'commons-fileupload:commons-fileupload:1.3.1'
    compile 'commons-httpclient:commons-httpclient:3.1'
    compile 'commons-lang:commons-lang:2.6' 
    compile 'commons-net:commons-net:3.4'

    //Others
    compile 'com.google.code.gson:gson:2.8.1'
    compile 'javax.mail:mail:1.4.7'
    compile 'org.apache.poi:poi:3.16' 
    compile group: 'org.apache.poi', name: 'poi-ooxml', version: '3.16' 

    // https://mvnrepository.com/artifact/org.json/json
    compile group: 'org.json', name: 'json', version: '20180130'

    // https://mvnrepository.com/artifact/javax.servlet.jsp/javax.servlet.jsp-api
    compile group: 'javax.servlet.jsp', name: 'javax.servlet.jsp-api', version: '2.3.1'

    // https://mvnrepository.com/artifact/org.apache.tika/tika-core
    compile group: 'org.apache.tika', name: 'tika-core', version: '1.18'
    // https://mvnrepository.com/artifact/org.apache.tika/tika-parsers
    compile group: 'org.apache.tika', name: 'tika-parsers', version: '1.18'

    // https://mvnrepository.com/artifact/com.itextpdf/itextpdf
    compile group: 'com.itextpdf', name: 'itextpdf', version: '5.5.13'
        }

请注意,以下代码部分在注释或未注释时没有影响:

 testCompile group: 'org.jboss.logmanager', name: 'jboss-logmanager', version: '2.1.4.Final'

从Spring Data JPA中排除JBoss也没有影响:

 compile('org.springframework.boot:spring-boot-starter-data-jpa'){
        exclude group: 'org.jboss.logging'
}

这是在build.gradle中使用最少数量的spring依赖项的依赖关系树

runtime - Runtime dependencies for source set 'main' (deprecated, use 'runtimeOnly ' instead).
                    +--- junit:junit:4.12
                    |    \--- org.hamcrest:hamcrest-core:1.3
                    +--- org.springframework.boot:spring-boot-starter-data-jpa -> 2.0.4.RELEASE
                    |    +--- org.springframework.boot:spring-boot-starter:2.0.4.RELEASE
                    |    |    +--- org.springframework.boot:spring-boot:2.0.4.RELEASE
                    |    |    |    +--- org.springframework:spring-core:5.0.8.RELEASE
                    |    |    |    |    \--- org.springframework:spring-jcl:5.0.8.RELEASE
                    |    |    |    \--- org.springframework:spring-context:5.0.8.RELEASE
                    |    |    |         +--- org.springframework:spring-aop:5.0.8.RELEASE
                    |    |    |         |    +--- org.springframework:spring-beans:5.0.8.RELEASE
                    |    |    |         |    |    \--- org.springframework:spring-core:5.0.8.RELEASE (*)
                    |    |    |         |    \--- org.springframework:spring-core:5.0.8.RELEASE (*)
                    |    |    |         +--- org.springframework:spring-beans:5.0.8.RELEASE (*)
                    |    |    |         +--- org.springframework:spring-core:5.0.8.RELEASE (*)
                    |    |    |         \--- org.springframework:spring-expression:5.0.8.RELEASE
                    |    |    |              \--- org.springframework:spring-core:5.0.8.RELEASE (*)
                    |    |    +--- org.springframework.boot:spring-boot-autoconfigure:2.0.4.RELEASE
                    |    |    |    \--- org.springframework.boot:spring-boot:2.0.4.RELEASE (*)
                    |    |    +--- org.springframework.boot:spring-boot-starter-logging:2.0.4.RELEASE
                    |    |    |    +--- ch.qos.logback:logback-classic:1.2.3
                    |    |    |    |    +--- ch.qos.logback:logback-core:1.2.3
                    |    |    |    |    \--- org.slf4j:slf4j-api:1.7.25
                    |    |    |    +--- org.apache.logging.log4j:log4j-to-slf4j:2.10.0
                    |    |    |    |    +--- org.slf4j:slf4j-api:1.7.25
                    |    |    |    |    \--- org.apache.logging.log4j:log4j-api:2.10.0
                    |    |    |    \--- org.slf4j:jul-to-slf4j:1.7.25
                    |    |    |         \--- org.slf4j:slf4j-api:1.7.25
                    |    |    +--- javax.annotation:javax.annotation-api:1.3.2
                    |    |    +--- org.springframework:spring-core:5.0.8.RELEASE (*)
                    |    |    \--- org.yaml:snakeyaml:1.19
                    |    +--- org.springframework.boot:spring-boot-starter-aop:2.0.4.RELEASE
                    |    |    +--- org.springframework.boot:spring-boot-starter:2.0.4.RELEASE (*)
                    |    |    +--- org.springframework:spring-aop:5.0.8.RELEASE (*)
                    |    |    \--- org.aspectj:aspectjweaver:1.8.13
                    |    +--- org.springframework.boot:spring-boot-starter-jdbc:2.0.4.RELEASE
                    |    |    +--- org.springframework.boot:spring-boot-starter:2.0.4.RELEASE (*)
                    |    |    +--- com.zaxxer:HikariCP:2.7.9
                    |    |    |    \--- org.slf4j:slf4j-api:1.7.25
                    |    |    \--- org.springframework:spring-jdbc:5.0.8.RELEASE
                    |    |         +--- org.springframework:spring-beans:5.0.8.RELEASE (*)
                    |    |         +--- org.springframework:spring-core:5.0.8.RELEASE (*)
                    |    |         \--- org.springframework:spring-tx:5.0.8.RELEASE
                    |    |              +--- org.springframework:spring-beans:5.0.8.RELEASE (*)
                    |    |              \--- org.springframework:spring-core:5.0.8.RELEASE (*)
                    |    +--- org.hibernate:hibernate-core:5.2.17.Final
                    |    |    +--- org.jboss.logging:jboss-logging:3.3.1.Final -> 3.3.2.Final
                    |    |    +--- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:1.0.0.Final -> 1.0.2.Final
                    |    |    +--- org.javassist:javassist:3.22.0-GA
                    |    |    +--- antlr:antlr:2.7.7
                    |    |    +--- org.jboss:jandex:2.0.3.Final
                    |    |    +--- com.fasterxml:classmate:1.3.0 -> 1.3.4
                    |    |    +--- dom4j:dom4j:1.6.1
                    |    |    \--- org.hibernate.common:hibernate-commons-annotations:5.0.1.Final
                    |    |         \--- org.jboss.logging:jboss-logging:3.3.0.Final -> 3.3.2.Final
                    |    +--- javax.transaction:javax.transaction-api:1.2
                    |    +--- org.springframework.data:spring-data-jpa:2.0.9.RELEASE
                    |    |    +--- org.springframework.data:spring-data-commons:2.0.9.RELEASE
                    |    |    |    +--- org.springframework:spring-core:5.0.8.RELEASE (*)
                    |    |    |    +--- org.springframework:spring-beans:5.0.8.RELEASE (*)
                    |    |    |    \--- org.slf4j:slf4j-api:1.7.25
                    |    |    +--- org.springframework:spring-orm:5.0.8.RELEASE
                    |    |    |    +--- org.springframework:spring-beans:5.0.8.RELEASE (*)
                    |    |    |    +--- org.springframework:spring-core:5.0.8.RELEASE (*)
                    |    |    |    +--- org.springframework:spring-jdbc:5.0.8.RELEASE (*)
                    |    |    |    \--- org.springframework:spring-tx:5.0.8.RELEASE (*)
                    |    |    +--- org.springframework:spring-context:5.0.8.RELEASE (*)
                    |    |    +--- org.springframework:spring-aop:5.0.8.RELEASE (*)
                    |    |    +--- org.springframework:spring-tx:5.0.8.RELEASE (*)
                    |    |    +--- org.springframework:spring-beans:5.0.8.RELEASE (*)
                    |    |    +--- org.springframework:spring-core:5.0.8.RELEASE (*)
                    |    |    \--- org.slf4j:slf4j-api:1.7.25
                    |    \--- org.springframework:spring-aspects:5.0.8.RELEASE
                    |         \--- org.aspectj:aspectjweaver:1.8.13
                    \--- mysql:mysql-connector-java -> 5.1.46

0 个答案:

没有答案