个人Spring Boot学习中遇到的bug
版本问题(SpringBoot启动时)
bug:
org/springframework/boot/SpringApplication 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 55.0
因为好多人都是用java8,java11在开发,但是Spring3.0的版本最低要java 17
(图片来源于官方文档截图)
所以外面只要在这两个地方改一下就行
一是 pom.xml 文件,这个地方
二是模块设置,这里
我的是java 11,刷新一下mavan就成功了
版本问题 SpringBoot+Mybatis
bug
Unable to instantiate org.mybatis.spring.boot.autoconfigure.MybatisDependsOnDatabaseInitializationDetector [org.springframework.boot.sql.init.dependency.DependsOnDatabaseInitializationDetector]
因为SpringBoot版本支持问题,SpringBoot 2.0的支持 Mybatis 的 版本不一样(图中是正确的版本)
改了之后一样要刷新 Mavan ,然后重启