如题
在pom.xml文件中添加配置:
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
<encoding>UTF-8</encoding>
<compilerArguments>
<extdirs>src\main\webapp\WEB-INF\lib</extdirs>
</compilerArguments>
</configuration>
</plugin>
对应自己的JDK版本和对应的jar包的位置
plugin>的位置是在
project–>build–>plugins–>plugin…