Spring Boot 引入org.springframework.boot.SpringApplication出错

今天新建的一个spring boot maven项目,

写启动类时发现无法引入SpringApplication,

经查原来是冲突了,我早些时候用了比较低版本的spring boot创建了项目

,导致电脑用户文件夹下有旧版本的配置,现在用新的版本导致了冲突

,那么只要删除冲突的老版本,文件夹地址

C:\Users\hanfuqingshi\.m2\repository\org\springframework\boot\spring-boot

下的2.0.0.RELEASE为新版本,而其它的为老版本,删除老版本后,

在IDE 项目右键Run As - maven clean 在maven install

,最后maven - update project即可。

原文地址:https://www.cnblogs.com/mrcln/p/8502816.html

时间: 2024-08-30 00:01:05

Spring Boot 引入org.springframework.boot.SpringApplication出错的相关文章

spring boot 引入模板

今天主要说下,配置在resources文件中的内容怎样被spring boot所引用. 引用静态模板的值 thymeleaf和spring boot的整合,及相关配置 根据springboot 推荐的格式,我们知道放在resources 都是一些资源,包括整个项目的配置啊 ,自定义配置啊  ,静态资源文件 (js,css等),以properties结尾.字面意思就是属性暂且就这么翻译吧. application.properties是项目资源的配置,比如jar包的配置啊,比如默认端口是8080

转:关于java.lang.ClassNotFoundException: org.springframework.boot.SpringApplication的解决

在这个控制板中,出现了这个问题 java.lang.ClassNotFoundException: org.springframework.boot.SpringApplication 虽然明显知道是jar包问题,不管怎么clean怎么的还是没能解决.鼓捣了很久没结果,stackoverflow什么的也翻遍了,依然没找到结果,但是偶然发现另外一个Spring boot项目是可以启动的,对比了一下他们的区别,发现父项目配置的版本不一致,可以启动的是1.3.5版本的,不能启动的是1.4.0版本 解决

springaop问题——Cannot subclass final class org.springframework.boot.autoconfigure.AutoConfigurationPackages$BasePackages

问题描述: 在使用springaop对目标对象增强时,若切点的条件过于宽泛就会出现以下异常! 如: @Before("execution(* *(..))") @Before("args(..)") @Before("within(org..*)") ... org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.spr

springboot 配置jpa启动报Error processing condition on org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration.pageableCustomizer

springboot +gradle 配置jpa启动报Error processing condition on org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration.pageableCustomizer 经过一步步查看删选是因为spring-data-jpa包的版本冲突导致. 解决方案: 修改gradle的build.gradle配置文件 a.添加plugin("org.springfram

java.lang.IllegalStateException: Error processing condition on org.springframework.boot.autoconfigure.thymeleaf.ThymeleafAutoConfiguration$ThymeleafDefaultConfiguration.templateEngine

2018-12-25 22:58:28.023 DEBUG 2204 --- [ restartedMain] c.c.c.a.CrawlerAutohomeApplication : Running with Spring Boot v2.1.1.RELEASE, Spring v5.1.3.RELEASE 2018-12-25 22:58:28.039 INFO 2204 --- [ restartedMain] c.c.c.a.CrawlerAutohomeApplication : No

Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/boot/context/embedded/ServletRegistrationBean

异常信息 2017-09-02 18:06:37.223 [main] ERROR o.s.boot.SpringApplication - Application startup failed java.lang.IllegalStateException: Could not evaluate condition on org.springframework.boot.actuate.autoconfigure.EndpointWebMvcAutoConfiguration$Endpoint

org.springframework.boot.builder.SpringApplicationBuilder.<init>

新建了一个Spring cloud项目,启动时报错org.springframework.boot.builder.SpringApplicationBuilder.<init> 翻阅资料得知,是由于Spring boot版本和spring cloud版本不兼容导致的,由于当前我使用的是Spring boot 2.0,对应的应该使用Spring cloud 的Finchley版本. 具体对应兼容关系如下: Spring Cloud Spring Boot Finchley 兼容Spring B

解决分页插件ClassNotFoundException: org.springframework.boot.bind.RelaxedPropertyResolver

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.github.pagehelper.autoconfigure.PageHelperAutoConfiguration': Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateExce

Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.2.1.RELEASE from/to

在使用SpringBoot项目时报错Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.5.21.RELEASE from/to default from/to default (http://maven.aliyun.com/nexus/content/groups/public): Access denied to: http://maven.aliyun.com/nexu