在idea中创建springboot项目启动时出现java.lang.NoClassDefFoundError: ch/qos/logback/core/spi/LifeCycle错误

使用idea创建spring boot 项目

第一步:点击File-Project

在idea中创建springboot项目启动时出现java.lang.NoClassDefFoundError: ch/qos/logback/core/spi/LifeCycle错误

点击next

在idea中创建springboot项目启动时出现java.lang.NoClassDefFoundError: ch/qos/logback/core/spi/LifeCycle错误

点击next

选择web

在idea中创建springboot项目启动时出现java.lang.NoClassDefFoundError: ch/qos/logback/core/spi/LifeCycle错误

点击next

在idea中创建springboot项目启动时出现java.lang.NoClassDefFoundError: ch/qos/logback/core/spi/LifeCycle错误

点击Finish

当启动项目时出现错误

在idea中创建springboot项目启动时出现java.lang.NoClassDefFoundError: ch/qos/logback/core/spi/LifeCycle错误

解决方法:

点击File-Project Structure

在idea中创建springboot项目启动时出现java.lang.NoClassDefFoundError: ch/qos/logback/core/spi/LifeCycle错误

找到Modules中如下图4个包,移除即可

在idea中创建springboot项目启动时出现java.lang.NoClassDefFoundError: ch/qos/logback/core/spi/LifeCycle错误

成功启动:

在idea中创建springboot项目启动时出现java.lang.NoClassDefFoundError: ch/qos/logback/core/spi/LifeCycle错误