Skip to content

spring-cloud-azure-starter-appconfiguration-config fails with org.springframework.cloud #1102

@Hjertaas

Description

@Hjertaas

As soon as org.springframework.cloud BOM is added, any application that has spring-cloud-azure-starter-appconfiguration-config dependency fails with a stacktrace in which the following is the main takeaway:

Factory method 'appConfigurationRefresh' threw exception with message: com.azure.spring.cloud.appconfiguration.config.implementation.AppConfigurationReplicaClientFactory has not been registered

To reproduce, you may use this pom.xml which is based on the follwing sample: https://github.com/Azure-Samples/azure-spring-boot-samples/tree/main/appconfiguration/spring-cloud-azure-starter-appconfiguration-config/spring-cloud-azure-starter-appconfiguration-config-sample

<?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>3.5.5</version>
    <relativePath/> <!-- lookup parent from repository -->
  </parent>

  <groupId>com.azure.spring</groupId>
  <artifactId>spring-cloud-azure-starter-appconfiguration-config-sample</artifactId>
  <version>1.0.0</version>
  <packaging>jar</packaging>
  <name>Azure App Configuration Refresh Sample</name>

  <properties>
    <maven.compiler.source>17</maven.compiler.source>
    <maven.compiler.target>17</maven.compiler.target>
    <version.spring.cloud.azure>6.0.0</version.spring.cloud.azure>
    <spring-cloud.version>2025.0.0</spring-cloud.version>
  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>com.azure.spring</groupId>
        <artifactId>spring-cloud-azure-dependencies</artifactId>
        <version>${version.spring.cloud.azure}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

      <dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-dependencies</artifactId>
        <version>${spring-cloud.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
      <groupId>com.azure.spring</groupId>
      <artifactId>spring-cloud-azure-starter-appconfiguration-config</artifactId>
    </dependency>

    <!-- Adds the Ability to Push Refresh -->
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-actuator</artifactId>
    </dependency>

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions