【10】maven打包报错 spring-boot-maven-plugin 与spring-boot 版本的不一致

报错信息

org/springframework/boot/maven/RepackageMojo has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file versions up to 52.0

解决方法

是因为pring-boot-maven-plugin 与spring-boot 版本的不一致导致的,修改Pom.xml文件 添加 ${spring-boot.version}即可

<dependency>
                <groupId>org.springframework.bootgroupId>
                <artifactId>spring-boot-dependenciesartifactId>
                <version>${spring-boot.version}version>
                <type>pomtype>
                <scope>importscope>
            dependency>

你可能感兴趣的:(SpringBoot,maven,java,开发语言)