springboot maven插件打包报错:程序包jdk.internal.org.objectweb.asm不存在

在使用springboot maven插件构建项目时报错jdk.internal.org.objectweb.asm不存在,缘由是 rt包没有打包到项目中去,须要在pom。xml文件中配置将jdk的相关jar打入项目中,以下:java

<plugin>
    <artifactId>maven-compiler-plugin</artifactId>
    <configuration>
        <source>1.8</source>
        <target>1.8</target>
        <encoding>UTF-8</encoding>
        <compilerArguments>
            <verbose />
            <!-- 将jdk的依赖jar打入项目中,这样项目中使用的jdk的依赖就尅正常使用 -->
            <bootclasspath>${java.home}/lib/rt.jar;${java.home}/lib/jce.jar;${java.home}/lib/jsse.jar</bootclasspath>
        </compilerArguments>
    </configuration>
</plugin>

以后重现执行mvn clean install就能够了。web

相关文章
相关标签/搜索