The right way to resolve the conflict jar

Open pom file, select the inside right

appear

Inside CTRL + F, direct search jar name you want to find, and then find a single jar, then down the line to find the ultimate structure of dependence, then exclude them

<exclusions>
    <exclusion>
        <groupId>javax.persistence</groupId>
        <artifactId>persistence-api</artifactId>
    </exclusion>
</exclusions>

Note: If you are a multi-module project, to go one by one pom, found during practice, the parent pom can not find the child. But the child can find the parent. It should also be object-oriented thinking. Because our own building project, put the parent is dependent on the public part, put their own own unique

There is a plug-maven helper can download the idea

Published 168 original articles · won praise 16 · views 90000 +

Guess you like

Origin blog.csdn.net/ajax_yan/article/details/104987981