使用spring-boot-starter-data-jpa时的休眠核心错误

问题描述 投票:0回答:1

我必须将基于spring-MVC 3的旧项目迁移到spring boot 2(spring-MVC 5)。我已经使用spring initializr从头开始创建了一个项目,然后将文件复制到了新项目中。使用的数据库是oracle,作为ORM,是mybatis。运行mvn spring-boot:run时,收到有关休眠的错误:

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Unsatisfied dependency expressed through method 'entityManagerFactory' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'entityManagerFactoryBuilder' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Unsatisfied dependency expressed through method 'entityManagerFactoryBuilder' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaVendorAdapter' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.orm.jpa.JpaVendorAdapter]: Factory method 'jpaVendorAdapter' threw exception; nested exception is java.lang.NoClassDefFoundError: org/hibernate/ejb/HibernatePersistence

听起来好像休眠初始化出了点问题。我正在使用spring-boot-starter-data-jpa

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>

mvn dependency:list之后,我确定没有与hibernate-core冲突的依赖项(仅包含一次)

...
[INFO] |  +- org.hibernate:hibernate-core:jar:5.4.10.Final:compile
[INFO] |  |  +- org.javassist:javassist:jar:3.24.0-GA:compile
[INFO] |  |  +- org.jboss:jandex:jar:2.1.1.Final:compile
[INFO] |  |  +- com.fasterxml:classmate:jar:1.5.1:compile
[INFO] |  |  +- org.dom4j:dom4j:jar:2.1.1:compile
[INFO] |  |  +- org.hibernate.common:hibernate-commons-annotations:jar:5.1.0.Final:compile
[INFO] |  |  \- org.glassfish.jaxb:jaxb-runtime:jar:2.3.2:compile
[INFO] |  |     +- org.glassfish.jaxb:txw2:jar:2.3.2:compile
[INFO] |  |     +- com.sun.istack:istack-commons-runtime:jar:3.0.8:compile
[INFO] |  |     \- org.jvnet.staxex:stax-ex:jar:1.8.1:compile
[INFO] |  +- org.springframework.data:spring-data-jpa:jar:2.2.4.RELEASE:compile
[INFO] |  |  \- org.springframework.data:spring-data-commons:jar:2.2.4.RELEASE:compile
[INFO] |  \- org.springframework:spring-aspects:jar:5.2.3.RELEASE:compile
[INFO] \- com.h2database:h2:jar:1.4.200:runtime

pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.2.4.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>jp.co.xx.yy</groupId>
    <artifactId>myproject</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>myproject</name>
    <description>myproject project</description>

    <properties>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <scope>runtime</scope>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.junit.vintage</groupId>
                    <artifactId>junit-vintage-engine</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.apache.ws.commons.schema</groupId>
            <artifactId>XmlSchema</artifactId>
            <version>1.4.7</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/aopalliance/aopalliance -->
        <dependency>
            <groupId>aopalliance</groupId>
            <artifactId>aopalliance</artifactId>
            <version>1.0</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.directory.api/api-asn1-api -->
        <dependency>
            <groupId>org.apache.directory.api</groupId>
            <artifactId>api-asn1-api</artifactId>
            <version>2.0.0</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.aspectj/aspectjrt -->
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
            <version>1.9.5</version>
        </dependency>


        <!-- https://mvnrepository.com/artifact/org.aspectj/aspectjweaver -->
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjweaver</artifactId>
            <version>1.9.5</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.ws.commons.axiom/axiom-api -->
        <dependency>
            <groupId>org.apache.ws.commons.axiom</groupId>
            <artifactId>axiom-api</artifactId>
            <version>1.2.8</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.ws.commons.axiom/axiom-dom -->
        <dependency>
            <groupId>org.apache.ws.commons.axiom</groupId>
            <artifactId>axiom-dom</artifactId>
            <version>1.2.8</version>
        </dependency>


        <!-- https://mvnrepository.com/artifact/org.apache.ws.commons.axiom/axiom-impl -->
        <dependency>
            <groupId>org.apache.ws.commons.axiom</groupId>
            <artifactId>axiom-impl</artifactId>
            <version>1.2.8</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis/axis -->
        <dependency>
            <groupId>org.apache.axis</groupId>
            <artifactId>axis</artifactId>
            <version>1.4</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-adb -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-adb</artifactId>
            <version>1.5.6</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-adb-codegen -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-adb-codegen</artifactId>
            <version>1.5.6</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-ant-plugin -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-ant-plugin</artifactId>
            <version>1.5.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-clustering -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-clustering</artifactId>
            <version>1.5.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-corba -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-corba</artifactId>
            <version>1.5.6</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-fastinfoset -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-fastinfoset</artifactId>
            <version>1.5.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-java2wsdl -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-java2wsdl</artifactId>
            <version>1.5.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-jaxbri -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-jaxbri</artifactId>
            <version>1.5.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-json -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-json</artifactId>
            <version>1.5.6</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-kernel -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-kernel</artifactId>
            <version>1.5.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-metadata -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-metadata</artifactId>
            <version>1.5.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-mtompolicy -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-mtompolicy</artifactId>
            <version>1.5</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-saaj -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-saaj</artifactId>
            <version>1.5.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-spring -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-spring</artifactId>
            <version>1.5.5</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-transport-http -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-transport-http</artifactId>
            <version>1.5.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-transport-local -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-transport-local</artifactId>
            <version>1.5.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-xmlbeans -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-xmlbeans</artifactId>
            <version>1.5.1</version>
        </dependency>

        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-jaxws</artifactId>
            <version>1.5.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/bcel/bcel -->
        <dependency>
            <groupId>bcel</groupId>
            <artifactId>bcel</artifactId>
            <version>5.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/cglib/cglib -->
        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib</artifactId>
            <version>2.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/commons-codec/commons-codec -->
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.6</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/commons-collections/commons-collections -->
        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
            <version>3.2.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/commons-discovery/commons-discovery -->
        <dependency>
            <groupId>commons-discovery</groupId>
            <artifactId>commons-discovery</artifactId>
            <version>0.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/commons-fileupload/commons-fileupload -->
        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
            <version>1.2.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/commons-httpclient/commons-httpclient -->
        <dependency>
            <groupId>commons-httpclient</groupId>
            <artifactId>commons-httpclient</artifactId>
            <version>3.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>1.4</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/commons-lang/commons-lang -->
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.3</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/commons-logging/commons-logging -->
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
            <version>1.1.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.dbunit/dbunit -->
        <dependency>
            <groupId>org.dbunit</groupId>
            <artifactId>dbunit</artifactId>
            <version>2.4.9</version>
            <scope>test</scope>
        </dependency>

        <!-- https://mvnrepository.com/artifact/net.sf.ehcache/ehcache -->
        <dependency>
            <groupId>net.sf.ehcache</groupId>
            <artifactId>ehcache</artifactId>
            <version>2.10.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/net.sf.ezmorph/ezmorph -->
        <dependency>
            <groupId>net.sf.ezmorph</groupId>
            <artifactId>ezmorph</artifactId>
            <version>1.0.6</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore -->
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
            <version>4.2.3</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.infinispan/infinispan-commons -->
        <dependency>
            <groupId>org.infinispan</groupId>
            <artifactId>infinispan-commons</artifactId>
            <version>6.0.2.Final</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.infinispan/infinispan-core -->
        <dependency>
            <groupId>org.infinispan</groupId>
            <artifactId>infinispan-core</artifactId>
            <version>6.0.2.Final</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.codehaus.jackson/jackson-mapper-asl -->
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-mapper-asl</artifactId>
            <version>1.9.11</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.codehaus.jackson/jackson-core-asl -->
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-core-asl</artifactId>
            <version>1.9.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/jalopy/jalopy -->
        <dependency>
            <groupId>jalopy</groupId>
            <artifactId>jalopy</artifactId>
            <version>1.5rc3</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.jasypt/jasypt -->
        <dependency>
            <groupId>org.jasypt</groupId>
            <artifactId>jasypt</artifactId>
            <version>1.9.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.jasypt/jasypt-spring3 -->
        <dependency>
            <groupId>org.jasypt</groupId>
            <artifactId>jasypt-spring3</artifactId>
            <version>1.9.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api -->
        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <version>2.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/com.sun.xml.bind/jaxb-impl -->
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-impl</artifactId>
            <version>2.1.7</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/com.sun.xml.bind/jaxb-xjc -->
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-xjc</artifactId>
            <version>2.1.7</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/jaxen/jaxen -->
        <dependency>
            <groupId>jaxen</groupId>
            <artifactId>jaxen</artifactId>
            <version>1.1.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.jboss.logging/jboss-logging -->
        <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging</artifactId>
            <version>3.1.2.GA</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.jboss.marshalling/jboss-marshalling -->
        <dependency>
            <groupId>org.jboss.marshalling</groupId>
            <artifactId>jboss-marshalling</artifactId>
            <version>1.4.4.Final</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.jboss.marshalling/jboss-marshalling-river -->
        <dependency>
            <groupId>org.jboss.marshalling</groupId>
            <artifactId>jboss-marshalling-river</artifactId>
            <version>1.4.4.Final</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.jfree/jcommon -->
        <dependency>
            <groupId>org.jfree</groupId>
            <artifactId>jcommon</artifactId>
            <version>1.0.23</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.codehaus.jettison/jettison -->
        <dependency>
            <groupId>org.codehaus.jettison</groupId>
            <artifactId>jettison</artifactId>
            <version>1.0-RC2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.jfree/jfreechart -->
        <dependency>
            <groupId>org.jfree</groupId>
            <artifactId>jfreechart</artifactId>
            <version>1.0.19</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.jgroups/jgroups -->
        <dependency>
            <groupId>org.jgroups</groupId>
            <artifactId>jgroups</artifactId>
            <version>3.4.1.Final</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.jibx/jibx-bind -->
        <dependency>
            <groupId>org.jibx</groupId>
            <artifactId>jibx-bind</artifactId>
            <version>1.2.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/jfree/jcommon -->
        <dependency>
            <groupId>jfree</groupId>
            <artifactId>jcommon</artifactId>
            <version>1.0.16</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.springframework.security/spring-security-rsa -->
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-rsa</artifactId>
            <version>1.0.0.RELEASE</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/javax.mail/mail -->
        <dependency>
            <groupId>javax.mail</groupId>
            <artifactId>mail</artifactId>
            <version>1.4</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/mex -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>mex</artifactId>
            <version>1.5.1</version>
        </dependency>

             <!-- https://mvnrepository.com/artifact/org.mybatis/mybatis -->
             <dependency>
                <groupId>org.mybatis</groupId>
                <artifactId>mybatis</artifactId>
                <version>3.2.2</version>
             </dependency>

             <!-- https://mvnrepository.com/artifact/org.mybatis/mybatis-spring -->
             <dependency>
                <groupId>org.mybatis</groupId>
                <artifactId>mybatis-spring</artifactId>
                <version>1.2.0</version>
             </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.neethi/neethi -->
        <dependency>
            <groupId>org.apache.neethi</groupId>
            <artifactId>neethi</artifactId>
            <version>2.0.4</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.3.3</version>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-aop</artifactId>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.springframework/spring-jdbc -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
            <version>3.1.4.RELEASE</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.poi/poi -->
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi</artifactId>
            <version>3.2-FINAL</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.jboss.resteasy/resteasy-spring-boot-starter -->
        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-spring-boot-starter</artifactId>
            <version>4.4.0.Final</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.5</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-jcl -->
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-jcl</artifactId>
            <version>1.7.5</version>
            <scope>test</scope>
        </dependency>

        <!-- https://mvnrepository.com/artifact/jivesoftware/smack -->
        <dependency>
            <groupId>jivesoftware</groupId>
            <artifactId>smack</artifactId>
            <version>3.0.4</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/jivesoftware/smackx -->
        <dependency>
            <groupId>jivesoftware</groupId>
            <artifactId>smackx</artifactId>
            <version>3.0.4</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.woden/woden-api -->
        <dependency>
            <groupId>org.apache.woden</groupId>
            <artifactId>woden-api</artifactId>
            <version>1.0m8</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.woden/woden-impl-dom -->
        <dependency>
            <groupId>org.apache.woden</groupId>
            <artifactId>woden-impl-dom</artifactId>
            <version>1.0M8</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/wsdl4j/wsdl4j -->
        <dependency>
            <groupId>wsdl4j</groupId>
            <artifactId>wsdl4j</artifactId>
            <version>1.6.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.codehaus.woodstox/wstx-asl -->
        <dependency>
            <groupId>org.codehaus.woodstox</groupId>
            <artifactId>wstx-asl</artifactId>
            <version>3.2.4</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/xalan/xalan -->
        <dependency>
            <groupId>xalan</groupId>
            <artifactId>xalan</artifactId>
            <version>2.7.0</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/xerces/xercesImpl -->
        <dependency>
            <groupId>xerces</groupId>
            <artifactId>xercesImpl</artifactId>
            <version>2.6.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/xml-apis/xml-apis -->
        <dependency>
            <groupId>xml-apis</groupId>
            <artifactId>xml-apis</artifactId>
            <version>1.3.02</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/xml-resolver/xml-resolver -->
        <dependency>
            <groupId>xml-resolver</groupId>
            <artifactId>xml-resolver</artifactId>
            <version>1.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.xmlbeans/xmlbeans -->
        <dependency>
            <groupId>org.apache.xmlbeans</groupId>
            <artifactId>xmlbeans</artifactId>
            <version>2.3.0</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/net.lingala.zip4j/zip4j -->
        <dependency>
            <groupId>net.lingala.zip4j</groupId>
            <artifactId>zip4j</artifactId>
            <version>1.3.2</version>
        </dependency>


        <!-- https://mvnrepository.com/artifact/javax.xml/jaxrpc -->
        <dependency>
            <groupId>javax.xml</groupId>
            <artifactId>jaxrpc</artifactId>
            <version>1.1</version>
        </dependency>

        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>4.0.1</version>
        </dependency>


        <!-- https://mvnrepository.com/artifact/org.springframework/spring-orm -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-orm</artifactId>
            <version>3.1.4.RELEASE</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.pdfbox/fontbox -->
        <dependency>
            <groupId>org.apache.pdfbox</groupId>
            <artifactId>fontbox</artifactId>
            <version>1.8.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.pdfbox/jempbox -->
        <dependency>
            <groupId>org.apache.pdfbox</groupId>
            <artifactId>jempbox</artifactId>
            <version>1.8.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.pdfbox/pdfbox -->
        <dependency>
            <groupId>org.apache.pdfbox</groupId>
            <artifactId>pdfbox</artifactId>
            <version>1.8.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.pdfbox/pdfbox-app -->
        <dependency>
            <groupId>org.apache.pdfbox</groupId>
            <artifactId>pdfbox-app</artifactId>
            <version>1.8.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.pdfbox/preflight -->
        <dependency>
            <groupId>org.apache.pdfbox</groupId>
            <artifactId>preflight</artifactId>
            <version>1.8.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.pdfbox/preflight-app -->
        <dependency>
            <groupId>org.apache.pdfbox</groupId>
            <artifactId>preflight-app</artifactId>
            <version>1.8.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.pdfbox/xmpbox -->
        <dependency>
            <groupId>org.apache.pdfbox</groupId>
            <artifactId>xmpbox</artifactId>
            <version>1.8.2</version>
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.12</version>
            <scope>provided</scope>
        </dependency>

        <!-- packages manually set (not existing on maven repository) -->

        <dependency>
            <groupId>jp.co.xxx.yy.lib</groupId>
            <artifactId>CaplibServerOnline</artifactId>
            <version>1.0</version>
            <scope>system</scope>
            <systemPath>${basedir}/src/main/resources/lib/CaplibServerOnline.jar</systemPath>
        </dependency>

        <dependency>
            <groupId>jp.co.xxx.yy.lib</groupId>
            <artifactId>TiffToPdfBean2</artifactId>
            <version>1.0</version>
            <scope>system</scope>
            <systemPath>${basedir}/src/main/resources/lib/TiffToPdfBean2.jar</systemPath>
        </dependency>

        <dependency>
            <groupId>jp.co.xxx.yy.lib</groupId>
            <artifactId>WatermarkOption</artifactId>
            <version>1.0</version>
            <scope>system</scope>
            <systemPath>${basedir}/src/main/resources/lib/WatermarkOption.jar</systemPath>
        </dependency>

        <dependency>
            <groupId>jp.co.xxx.yy.lib</groupId>
            <artifactId>capgraphlib</artifactId>
            <version>1.0</version>
            <scope>system</scope>
            <systemPath>${basedir}/src/main/resources/lib/capgraphlib.jar</systemPath>
        </dependency>

        <dependency>
            <groupId>jp.co.xxx.yy.lib</groupId>
            <artifactId>caplib450</artifactId>
            <version>1.0</version>
            <scope>system</scope>
            <systemPath>${basedir}/src/main/resources/lib/caplib450.jar</systemPath>
        </dependency>

        <dependency>
            <groupId>jp.co.xxx.yy.lib</groupId>
            <artifactId>caplibdata</artifactId>
            <version>1.0</version>
            <scope>system</scope>
            <systemPath>${basedir}/src/main/resources/lib/caplibdata.jar</systemPath>
        </dependency>

        <dependency>
            <groupId>jp.co.xxx.yy.lib</groupId>
            <artifactId>caplibext450</artifactId>
            <version>1.0</version>
            <scope>system</scope>
            <systemPath>${basedir}/src/main/resources/lib/caplibext450.jar</systemPath>
        </dependency>

        <dependency>
            <groupId>jp.co.xxx.yy.lib</groupId>
            <artifactId>json-lib</artifactId>
            <version>2.4-jdk15</version>
            <scope>system</scope>
            <systemPath>${basedir}/src/main/resources/lib/json-lib-2.4-jdk15.jar</systemPath>
        </dependency>

        <!-- Oracle JDBC driver -->
        <dependency>
            <groupId>com.oracle</groupId>
            <artifactId>ojdbc7</artifactId>
            <version>12.1.0</version>
            <scope>system</scope>
            <systemPath>${basedir}/src/main/resources/lib/ojdbc7.jar</systemPath>
        </dependency>

        <!-- Common DBCP2 connection pool -->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-dbcp2</artifactId>
            <version>2.1.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-data-jpa -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.tomcat</groupId>
                    <artifactId>tomcat-jdbc</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-starter-logging</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-log4j</artifactId>
            <version>1.3.8.RELEASE</version>
        </dependency>

    </dependencies>

    <build>
        <plugins>

            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>

        </plugins>
    </build>

</project>

有什么想法吗?谢谢

java hibernate spring-boot maven mybatis
1个回答
0
投票

您的pom包含了很多方法,它包含有冲突的jar,甚至混合了来自不同版本的框架(Spring,Spring Boot,Axis等)的jar,这一切都在等待发生。

所有这些都来自您试图一次更新很多的简单事实。升级时,请采取一些小步骤,以使您知道什么会破坏什么,如here所述。

话虽如此,清理您的pom。

  1. 删除commons-logging
  2. 删除slf4j依赖项
  3. 删除spring-jdbc
  4. 删除spring-orm,改用spring-data-starter-jpa
  5. 轴的固定版本
  6. 修复Spring Boot依赖项的版本
  7. 删除aopalliance
  8. 删除cglib
  9. 删除jackson依赖项,因为Spring不支持(并且已经包含在spring-boot-starter-web中。
  10. 使用spring-boot-starter-mail而不是javax.mail依赖项>>
  11. log4j不支持,并且在2.2.4应用程序中添加对1.3.8 spring boot版本的依赖关系很麻烦。使用log4j2或默认的logback。
  12. 使用默认的HikariCP连接池,不包括tomcat并没有帮助,因为它不包含在内,只是坚持使用默认值。
  13. 有大量的XML编组器,JAXB,XMLBEans,Jibx,并且都包含在您的应用程序中,您正在使用的是它?
  14. [spring-boot-starter-aop已经包括AspectJ依赖项
  15. [spring-security-rsa指向旧的Spring Security版本,您可能需要升级到1.0.9
  16. 使用MyBatis Spring Boot入门而不是单独的依赖项
  17. 这里是部分清除的pom.xml。我尚未修复版本或删除xml编组器。我确实删除了slf4jlog4j和其他spring-jdbc / spring-orm依赖项。以及jackson。我还在顶部将Spring Boot依赖项分组在一起。

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.2.4.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>

    <groupId>jp.co.xx.yy</groupId>
    <artifactId>myproject</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>myproject</name>
    <description>myproject project</description>

    <properties>
        <java.version>1.8</java.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-mail</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-aop</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-data-jpa</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <scope>runtime</scope>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.junit.vintage</groupId>
                    <artifactId>junit-vintage-engine</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>mybatis-spring-boot-starter</artifactId>
            <version>2.1.2</version>
        </dependency>

        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-spring-boot-starter</artifactId>
            <version>4.4.0.Final</version>
        </dependency>

        <dependency>
            <groupId>org.apache.ws.commons.schema</groupId>
            <artifactId>XmlSchema</artifactId>
            <version>1.4.7</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.directory.api/api-asn1-api -->
        <dependency>
            <groupId>org.apache.directory.api</groupId>
            <artifactId>api-asn1-api</artifactId>
            <version>2.0.0</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.ws.commons.axiom/axiom-api -->
        <dependency>
            <groupId>org.apache.ws.commons.axiom</groupId>
            <artifactId>axiom-api</artifactId>
            <version>1.2.8</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.ws.commons.axiom/axiom-dom -->
        <dependency>
            <groupId>org.apache.ws.commons.axiom</groupId>
            <artifactId>axiom-dom</artifactId>
            <version>1.2.8</version>
        </dependency>


        <!-- https://mvnrepository.com/artifact/org.apache.ws.commons.axiom/axiom-impl -->
        <dependency>
            <groupId>org.apache.ws.commons.axiom</groupId>
            <artifactId>axiom-impl</artifactId>
            <version>1.2.8</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis/axis -->
        <dependency>
            <groupId>org.apache.axis</groupId>
            <artifactId>axis</artifactId>
            <version>1.4</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-adb -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-adb</artifactId>
            <version>1.5.6</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-adb-codegen -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-adb-codegen</artifactId>
            <version>1.5.6</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-ant-plugin -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-ant-plugin</artifactId>
            <version>1.5.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-clustering -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-clustering</artifactId>
            <version>1.5.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-corba -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-corba</artifactId>
            <version>1.5.6</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-fastinfoset -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-fastinfoset</artifactId>
            <version>1.5.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-java2wsdl -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-java2wsdl</artifactId>
            <version>1.5.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-jaxbri -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-jaxbri</artifactId>
            <version>1.5.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-json -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-json</artifactId>
            <version>1.5.6</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-kernel -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-kernel</artifactId>
            <version>1.5.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-metadata -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-metadata</artifactId>
            <version>1.5.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-mtompolicy -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-mtompolicy</artifactId>
            <version>1.5</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-saaj -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-saaj</artifactId>
            <version>1.5.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-spring -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-spring</artifactId>
            <version>1.5.5</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-transport-http -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-transport-http</artifactId>
            <version>1.5.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-transport-local -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-transport-local</artifactId>
            <version>1.5.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/axis2-xmlbeans -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-xmlbeans</artifactId>
            <version>1.5.1</version>
        </dependency>

        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-jaxws</artifactId>
            <version>1.5.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/bcel/bcel -->
        <dependency>
            <groupId>bcel</groupId>
            <artifactId>bcel</artifactId>
            <version>5.1</version>
        </dependency>
       <!-- https://mvnrepository.com/artifact/commons-codec/commons-codec -->
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.6</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/commons-collections/commons-collections -->
        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
            <version>3.2.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/commons-discovery/commons-discovery -->
        <dependency>
            <groupId>commons-discovery</groupId>
            <artifactId>commons-discovery</artifactId>
            <version>0.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/commons-fileupload/commons-fileupload -->
        <dependency>
            <groupId>commons-fileupload</groupId>
            <artifactId>commons-fileupload</artifactId>
            <version>1.2.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/commons-httpclient/commons-httpclient -->
        <dependency>
            <groupId>commons-httpclient</groupId>
            <artifactId>commons-httpclient</artifactId>
            <version>3.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>1.4</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/commons-lang/commons-lang -->
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.3</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.dbunit/dbunit -->
        <dependency>
            <groupId>org.dbunit</groupId>
            <artifactId>dbunit</artifactId>
            <version>2.4.9</version>
            <scope>test</scope>
        </dependency>

        <!-- https://mvnrepository.com/artifact/net.sf.ehcache/ehcache -->
        <dependency>
            <groupId>net.sf.ehcache</groupId>
            <artifactId>ehcache</artifactId>
            <version>2.10.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/net.sf.ezmorph/ezmorph -->
        <dependency>
            <groupId>net.sf.ezmorph</groupId>
            <artifactId>ezmorph</artifactId>
            <version>1.0.6</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpcore -->
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpcore</artifactId>
            <version>4.2.3</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.infinispan/infinispan-commons -->
        <dependency>
            <groupId>org.infinispan</groupId>
            <artifactId>infinispan-commons</artifactId>
            <version>6.0.2.Final</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.infinispan/infinispan-core -->
        <dependency>
            <groupId>org.infinispan</groupId>
            <artifactId>infinispan-core</artifactId>
            <version>6.0.2.Final</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/jalopy/jalopy -->
        <dependency>
            <groupId>jalopy</groupId>
            <artifactId>jalopy</artifactId>
            <version>1.5rc3</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.jasypt/jasypt -->
        <dependency>
            <groupId>org.jasypt</groupId>
            <artifactId>jasypt</artifactId>
            <version>1.9.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.jasypt/jasypt-spring3 -->
        <dependency>
            <groupId>org.jasypt</groupId>
            <artifactId>jasypt-spring3</artifactId>
            <version>1.9.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api -->
        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <version>2.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/com.sun.xml.bind/jaxb-impl -->
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-impl</artifactId>
            <version>2.1.7</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/com.sun.xml.bind/jaxb-xjc -->
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-xjc</artifactId>
            <version>2.1.7</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/jaxen/jaxen -->
        <dependency>
            <groupId>jaxen</groupId>
            <artifactId>jaxen</artifactId>
            <version>1.1.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.jboss.logging/jboss-logging -->
        <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging</artifactId>
            <version>3.1.2.GA</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.jboss.marshalling/jboss-marshalling -->
        <dependency>
            <groupId>org.jboss.marshalling</groupId>
            <artifactId>jboss-marshalling</artifactId>
            <version>1.4.4.Final</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.jboss.marshalling/jboss-marshalling-river -->
        <dependency>
            <groupId>org.jboss.marshalling</groupId>
            <artifactId>jboss-marshalling-river</artifactId>
            <version>1.4.4.Final</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.jfree/jcommon -->
        <dependency>
            <groupId>org.jfree</groupId>
            <artifactId>jcommon</artifactId>
            <version>1.0.23</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.codehaus.jettison/jettison -->
        <dependency>
            <groupId>org.codehaus.jettison</groupId>
            <artifactId>jettison</artifactId>
            <version>1.0-RC2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.jfree/jfreechart -->
        <dependency>
            <groupId>org.jfree</groupId>
            <artifactId>jfreechart</artifactId>
            <version>1.0.19</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.jgroups/jgroups -->
        <dependency>
            <groupId>org.jgroups</groupId>
            <artifactId>jgroups</artifactId>
            <version>3.4.1.Final</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.jibx/jibx-bind -->
        <dependency>
            <groupId>org.jibx</groupId>
            <artifactId>jibx-bind</artifactId>
            <version>1.2.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/jfree/jcommon -->
        <dependency>
            <groupId>jfree</groupId>
            <artifactId>jcommon</artifactId>
            <version>1.0.16</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.springframework.security/spring-security-rsa -->
        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-rsa</artifactId>
            <version>1.0.9.RELEASE</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.axis2/mex -->
        <dependency>
            <groupId>org.apache.axis2</groupId>
            <artifactId>mex</artifactId>
            <version>1.5.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.neethi/neethi -->
        <dependency>
            <groupId>org.apache.neethi</groupId>
            <artifactId>neethi</artifactId>
            <version>2.0.4</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient -->
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.3.3</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.poi/poi -->
        <dependency>
            <groupId>org.apache.poi</groupId>
            <artifactId>poi</artifactId>
            <version>3.2-FINAL</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.jboss.resteasy/resteasy-spring-boot-starter -->


        <!-- https://mvnrepository.com/artifact/jivesoftware/smack -->
        <dependency>
            <groupId>jivesoftware</groupId>
            <artifactId>smack</artifactId>
            <version>3.0.4</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/jivesoftware/smackx -->
        <dependency>
            <groupId>jivesoftware</groupId>
            <artifactId>smackx</artifactId>
            <version>3.0.4</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.woden/woden-api -->
        <dependency>
            <groupId>org.apache.woden</groupId>
            <artifactId>woden-api</artifactId>
            <version>1.0m8</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.woden/woden-impl-dom -->
        <dependency>
            <groupId>org.apache.woden</groupId>
            <artifactId>woden-impl-dom</artifactId>
            <version>1.0M8</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/wsdl4j/wsdl4j -->
        <dependency>
            <groupId>wsdl4j</groupId>
            <artifactId>wsdl4j</artifactId>
            <version>1.6.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.codehaus.woodstox/wstx-asl -->
        <dependency>
            <groupId>org.codehaus.woodstox</groupId>
            <artifactId>wstx-asl</artifactId>
            <version>3.2.4</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/xalan/xalan -->
        <dependency>
            <groupId>xalan</groupId>
            <artifactId>xalan</artifactId>
            <version>2.7.0</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/xerces/xercesImpl -->
        <dependency>
            <groupId>xerces</groupId>
            <artifactId>xercesImpl</artifactId>
            <version>2.6.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/xml-apis/xml-apis -->
        <dependency>
            <groupId>xml-apis</groupId>
            <artifactId>xml-apis</artifactId>
            <version>1.3.02</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/xml-resolver/xml-resolver -->
        <dependency>
            <groupId>xml-resolver</groupId>
            <artifactId>xml-resolver</artifactId>
            <version>1.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.xmlbeans/xmlbeans -->
        <dependency>
            <groupId>org.apache.xmlbeans</groupId>
            <artifactId>xmlbeans</artifactId>
            <version>2.3.0</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/net.lingala.zip4j/zip4j -->
        <dependency>
            <groupId>net.lingala.zip4j</groupId>
            <artifactId>zip4j</artifactId>
            <version>1.3.2</version>
        </dependency>


        <!-- https://mvnrepository.com/artifact/javax.xml/jaxrpc -->
        <dependency>
            <groupId>javax.xml</groupId>
            <artifactId>jaxrpc</artifactId>
            <version>1.1</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.pdfbox/fontbox -->
        <dependency>
            <groupId>org.apache.pdfbox</groupId>
            <artifactId>fontbox</artifactId>
            <version>1.8.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.pdfbox/jempbox -->
        <dependency>
            <groupId>org.apache.pdfbox</groupId>
            <artifactId>jempbox</artifactId>
            <version>1.8.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.pdfbox/pdfbox -->
        <dependency>
            <groupId>org.apache.pdfbox</groupId>
            <artifactId>pdfbox</artifactId>
            <version>1.8.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.pdfbox/pdfbox-app -->
        <dependency>
            <groupId>org.apache.pdfbox</groupId>
            <artifactId>pdfbox-app</artifactId>
            <version>1.8.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.pdfbox/preflight -->
        <dependency>
            <groupId>org.apache.pdfbox</groupId>
            <artifactId>preflight</artifactId>
            <version>1.8.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.pdfbox/preflight-app -->
        <dependency>
            <groupId>org.apache.pdfbox</groupId>
            <artifactId>preflight-app</artifactId>
            <version>1.8.2</version>
        </dependency>

        <!-- https://mvnrepository.com/artifact/org.apache.pdfbox/xmpbox -->
        <dependency>
            <groupId>org.apache.pdfbox</groupId>
            <artifactId>xmpbox</artifactId>
            <version>1.8.2</version>
        </dependency>

        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <version>1.18.12</version>
            <scope>provided</scope>
        </dependency>

        <!-- packages manually set (not existing on maven repository) -->

        <dependency>
            <groupId>jp.co.xxx.yy.lib</groupId>
            <artifactId>CaplibServerOnline</artifactId>
            <version>1.0</version>
            <scope>system</scope>
            <systemPath>${basedir}/src/main/resources/lib/CaplibServerOnline.jar</systemPath>
        </dependency>

        <dependency>
            <groupId>jp.co.xxx.yy.lib</groupId>
            <artifactId>TiffToPdfBean2</artifactId>
            <version>1.0</version>
            <scope>system</scope>
            <systemPath>${basedir}/src/main/resources/lib/TiffToPdfBean2.jar</systemPath>
        </dependency>

        <dependency>
            <groupId>jp.co.xxx.yy.lib</groupId>
            <artifactId>WatermarkOption</artifactId>
            <version>1.0</version>
            <scope>system</scope>
            <systemPath>${basedir}/src/main/resources/lib/WatermarkOption.jar</systemPath>
        </dependency>

        <dependency>
            <groupId>jp.co.xxx.yy.lib</groupId>
            <artifactId>capgraphlib</artifactId>
            <version>1.0</version>
            <scope>system</scope>
            <systemPath>${basedir}/src/main/resources/lib/capgraphlib.jar</systemPath>
        </dependency>

        <dependency>
            <groupId>jp.co.xxx.yy.lib</groupId>
            <artifactId>caplib450</artifactId>
            <version>1.0</version>
            <scope>system</scope>
            <systemPath>${basedir}/src/main/resources/lib/caplib450.jar</systemPath>
        </dependency>

        <dependency>
            <groupId>jp.co.xxx.yy.lib</groupId>
            <artifactId>caplibdata</artifactId>
            <version>1.0</version>
            <scope>system</scope>
            <systemPath>${basedir}/src/main/resources/lib/caplibdata.jar</systemPath>
        </dependency>

        <dependency>
            <groupId>jp.co.xxx.yy.lib</groupId>
            <artifactId>caplibext450</artifactId>
            <version>1.0</version>
            <scope>system</scope>
            <systemPath>${basedir}/src/main/resources/lib/caplibext450.jar</systemPath>
        </dependency>

        <dependency>
            <groupId>jp.co.xxx.yy.lib</groupId>
            <artifactId>json-lib</artifactId>
            <version>2.4-jdk15</version>
            <scope>system</scope>
            <systemPath>${basedir}/src/main/resources/lib/json-lib-2.4-jdk15.jar</systemPath>
        </dependency>

        <!-- Oracle JDBC driver -->
        <dependency>
            <groupId>com.oracle</groupId>
            <artifactId>ojdbc7</artifactId>
            <version>12.1.0</version>
            <scope>system</scope>
            <systemPath>${basedir}/src/main/resources/lib/ojdbc7.jar</systemPath>
        </dependency>

    </dependencies>

关于版本,我建议您在pom的顶部添加一些版本属性,并使用它们来管理像Axis这样的多jar框架的版本(当前,您正在混合至少3个版本的jar!)。

[我建议您仔细查看一下pom中是否有不需要的依赖项。您还包括本地项目的其他一些依赖项,请确保它们不会引入冲突的版本。

话虽这么说,通过还原已完成的所有操作,回到起始位置并逐个升级框架,您可能会再次变得更好。使用Spring Boot支持的版本后,用Spring Boot入门项目替换依赖项(仅对于依赖项mgmt!),最后一部分是在适用的情况下一步一步地用Spring Boot autoconfig替换您自己的配置。并确保在每个步骤中都保持工作的应用程序(因为这是您的起点!)。

© www.soinside.com 2019 - 2024. All rights reserved.