zoukankan      html  css  js  c++  java
  • Caused by: java.lang.NoClassDefFoundError: org/springframework/boot/context/properties/Configuration 和 出现 org.springframework.beans.factory.BeanCreationException 异常的原因及解决方法

    将boot版本降低
    问题原因
    cloud 依赖版本跟 boot不一致
    一般情况是 spring boot版本高于cloud版本
    修改版本即可

    例如 spring boot 版本是2.4.2
    其他cloud依赖是 2.4以下 就会报错
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.4.2</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>



      <dependency>
               <groupId>org.springframework.cloud</groupId>
            <artifactId>spring-cloud-starter-oauth2</artifactId>
            <version>2.2.4.RELEASE</version>
      </dependency>
    ————————————————

    <?xml version="1.0" encoding="UTF-8"?>
    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.1.5.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.cxqy</groupId>
    <artifactId>activity</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>activity</name>
    <description>Demo project for Spring Boot</description>
    <properties>
    <java.version>1.8</java.version>
    <spring-cloud.version>Greenwich.SR2</spring-cloud.version>
    </properties>
  • 相关阅读:
    jquery:class选择器(父子关系)
    jquery:跳转网页
    jquery:获得当前点击对象 : $(this)
    jquery:向后台提交数组
    03 适配器 代理 外观 装饰者
    02 工厂模式
    01 单例模式 Singleton
    设计模式概论与原则 & UML类图
    06 JDBC & ORM
    05 注解与反射 & JVM
  • 原文地址:https://www.cnblogs.com/yangsanluo/p/15152931.html
Copyright © 2011-2022 走看看