Home > Back-end >  Maven rely on references for help
Maven rely on references for help

Time:09-23

I added in the maven dependencies, details are as follows:
 & lt; Dependencies> 
& lt; Dependency>
& lt; groupId> Org. Mybatis
& lt; ArtifactId> Mybatis
& lt; Version> 3.4.5 & lt;/version>
& lt;/dependency>
& lt; Dependency>
& lt; groupId> Mysql
& lt; ArtifactId> Mysql connector - java
& lt; Version> 5.1.6 & lt;/version>
& lt;/dependency>
& lt; Dependency>
& lt; groupId> Log4j & lt;/groupId>
& lt; ArtifactId> Log4j & lt;/artifactId>
& lt; Version> 1.2.12 & lt;/version>
& lt;/dependency>
& lt; Dependency>
& lt; groupId> Junit
& lt; ArtifactId> Junit
& lt; Version> 4.10 & lt;/version>
& lt;/dependency>
& lt;/dependencies>

Then in the test class, according to the teacher's tutorial, wrote a mybatis entry case, compile time:

That's strange. Refer to what is normal, the compiler will prompt the

Add:
The local environment JDK version 13
The JDK version of the Project, the Module configuration are 13
Maven is configured in the configuration file version is 13

CodePudding user response:

Maven configuration version:
 & lt; Plugins> 
& lt; Plugin>
& lt; groupId> Org, apache maven. Plugins
& lt; ArtifactId> Maven - compiler - plugin
& lt; Version> 3.8.0 & lt;/version>
& lt; Configuration>
& lt; Source> 1.13 & lt;/source> & lt; ! To configure the source - use the development version is JDK1.13 - & gt;
& lt; Target> 1.13 & lt;/target> & lt; ! - configuration need to generate the goal of the class file is compiled versions of the JDK1.13 - & gt;
& lt;/configuration>
& lt;/plugin>
& lt;/plugins>

The project, the module configuration JDK version

  • Related