IDEA's maven project depends on importing successfully but an error is reported and the package cannot be found

problem

Use maven for the first time, configure jackson's dependency in pom.xml

<dependency>
      <groupId>com.fasterxml.jackson.core</groupId>
      <artifactId>jackson-databind</artifactId>
      <version>2.11.0</version>
    </dependency>

Idea can identify dependencies,
Insert picture description here
but click to run the project, the package can’t find exception
Insert picture description here

Analysis and solution

idea comes with a set of compiler run scripts, compile and run maven project here has been used, in order to avoid conflicts, open settingsthe runnermaven compiled to run on the hook
Insert picture description here

Guess you like

Origin blog.csdn.net/u013621398/article/details/108736409