今天在切换Springboot版本的以后,无法启动项目,错误信息如下:

原因是Springboot从1.3.1.RELEASE切换到2.0.4.RELEASE以后配置文件的格式也发生了改变,不能使用以前的格式了。

SpringBoot-1.3.1.RELEASE版本下的配置文件格式如上图所示。可以看到Idea已经提示了这里的配置有问题,但是我没有看到。
经查阅Springboot2.0官方文档我发现,正确的格式应该为level.<logger-name>=<level>

因此把配置文件改为下图的写法就可以了

网友评论