SpringBoot项目启动时报错:
项目启动的时候报了下面这个错误,查了很多资料后,发现idea自动生成的Springboot项目的依赖版本高了,将pom.xml中的版本号降低,就可以了
错误内容:
Exception in thread “main” java.lang.NoClassDefFoundError: org/springframework/util/Assert
at org.springframework.boot.SpringApplication.(SpringApplication.java:269)
at org.springframework.boot.SpringApplication.(SpringApplication.java:253)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
at com.atguigu.SpringbootWebApplication.main(SpringbootWebApplication.java:10)
Caused by: java.lang.ClassNotFoundException: org.springframework.util.Assert
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
… 5 more
Process finished with exit code 1
原来的版本:
解决方案: