在使用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