Java package conflict resolution! ! !

Recently, during development, I encountered a package conflict problem. My colleagues did not pull the latest code when coding, and the package was incorrectly guided and merged directly into the master branch. As a result, when the latest code was pulled and run, an error was reported directly, the package conflicted, and it could not be found. This class

The conflicting package is:
import org.hibernate.Criteria;
import com.bstek.dorado.data.provider.Criteria;

When I want to use the second package, I can’t find it. Solution:
When using the package, directly import it:
Insert picture description here
For package conflicts that import maven dependencies, you need to find a compatible version and replace the maven dependency address.

Insert picture description here

Guess you like

Origin blog.csdn.net/qq_42258975/article/details/109091350