由于jdk1.6以后jre中删除rt.jar,jce.jar,所以会出现以上问题
解决办法:
在pom文件中build -> plugins 中加入以下配置就可以了

<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
<compilerArguments>
<verbose />
<bootclasspath>${java.home}\lib\rt.jar${path.separator}${java.home}\lib\jce.jar${path.separator}</bootclasspath>
</compilerArguments>
</configuration>
</plugin>
网友评论