# SpringCloud集成 报错 An attempt was made to call a method that does not exist. The attempt was made

SpringCloud集成 报错 An attempt was made to call a method that does not exist. The attempt was made from the following location:

  • 详细报错结果如下:原因是SpringCloud和spring-boot-starter-parent的版本配置不搭配
    # SpringCloud集成 报错 An attempt was made to call a method that does not exist. The attempt was made_第1张图片
解决方法
Greenwich 2.1.x(可用2.1.4.RELEASE)
Finchley 2.0.x(可用2.0.5.RELEASE)
Edgware 1.5.x
Dalston 1.5.x

例如我的版本如下:

<parent>
    <groupId>org.springframework.bootgroupId>
    <artifactId>spring-boot-starter-parentartifactId>
    <version>2.0.7.RELEASEversion>
parent>

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.cloudgroupId>
            <artifactId>spring-cloud-dependenciesartifactId>
            
            <version>Finchley.SR2version>
            <type>pomtype>
            <scope>importscope>
        dependency>
    dependencies>
dependencyManagement>

官网查看版本对应关系
  • 版本需要对应
    # SpringCloud集成 报错 An attempt was made to call a method that does not exist. The attempt was made_第2张图片

你可能感兴趣的:(报错大全,spring,cloud,spring,boot,后端)