关于pom.xml中的dependency中的顺序

时间:2022-08-23 20:08:44

特别注意:

      <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-api</artifactId>
                <version>${log.log4j2.version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-core</artifactId>
                <version>${log.log4j2.version}</version>
            </dependency>

和:

 
            <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-core</artifactId>
                <version>${log.log4j2.version}</version>
            </dependency>    
         <dependency>
                <groupId>org.apache.logging.log4j</groupId>
                <artifactId>log4j-api</artifactId>
                <version>${log.log4j2.version}</version>
            </dependency>        

表示的含义是不一样的,有可能会导致报错,特此记下。

 

案例:http://www.tuicool.com/articles/INveIf

相关文章