Spring boot 版本升级问题汇总总结
1、
升级前版本
->升级后版本 ->升级后版本
因版本升级,会有很多方法和引用会失效,找到编译报错的地方逐步适配即可,主要涉及的有Application中的
另外还有
还有
还有
还有
还有
还有其他报错的话,需要一个个的修改写法
2、添加了session依赖后的报错
No Spring Session store is configured: set the spring.session.store-type property
No Spring Session store is configured: set the spring.session.store-type property
No Spring Session store is configured: set the spring.session.store-type property
是因为少了session的配置
session store type使用来存放session的存储方式,目前Spring boot中只支持方式。如果本应用暂无需将session放入redis的需求,故这里就可以将session store type设置为none.
可以将此配置信息放入application.properites之中:
# default-store in spring session. it will be set in redis only outside.
spring.session.store-type=none
再次启动,成功。
如果使用redis存储session:
application.properties配置
spring.session.store-type=redis
3、另外碰到一个打包的问题
No goals have been specified for this build
解决办法,在pom.xml添加如下配置:
pom.xml文件<build>标签里面加上<defaultGoal>compile</defaultGoal>即可