Reason:
Personal consideration is the reason for this error because the testing and development in eclipse is unknown. There is no error in IntelliJ, because IntelliJ's management of the project is the same as the MAVEN structure.
Solution:
The original JUnit scope is test and can be commented upon as a temporary solution:
Old:
<Dependency> <groupId>Junit</groupId> <Artifactid>Junit</Artifactid> <!--The default version is 3.8.1, modified to 4.x, because 3.x is used in a programmatic way, and 4.x is in the form of annotations. - <version>4.12</version> <!--Indicates that the scope of this dependency is test - <Scope>Test</Scope> </Dependency>
New:
<Dependency> <groupId>Junit</groupId> <Artifactid>Junit</Artifactid> <!--The default version is 3.8.1, modified to 4.x, because 3.x is used in a programmatic way, and 4.x is in the form of annotations. - <version>4.12</version> </Dependency>
Eclipse Development MAVEN Project tip: Package Org.junit does not exist solution