【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.boot</groupId><artifactId>spring-boot-dependencies</artifactId><version>${spring-boot.version}</version><type>pom</type><scope>import</scope></dependency>