Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion eng/versioning/external_dependencies.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# make sure the version is same to sdk/spring/scripts/spring_boot_2.7.18_managed_external_dependencies.txt
# If your version is different from sdk/spring/scripts/spring_boot_2.7.18_managed_external_dependencies.txt,
# please discuss with Spring Integration team members:
# @rujche (rujche), @saragluna (xiada), @yiliuTo (yiliu6), @backwind1233 (zhihaoguo).
# @rujche (rujche), @saragluna (xiada).
# Thanks.

# Format;
Expand Down Expand Up @@ -505,6 +505,7 @@ springboot3_org.springframework.boot:spring-boot-autoconfigure;3.3.3
springboot3_org.springframework.boot:spring-boot-configuration-metadata;3.3.3
springboot3_org.springframework.boot:spring-boot-configuration-processor;3.3.3
springboot3_org.springframework.boot:spring-boot-dependencies;3.3.3
springboot3_org.springframework.boot:spring-boot-docker-compose;3.3.3
springboot3_org.springframework.boot:spring-boot-starter-actuator;3.3.3
springboot3_org.springframework.boot:spring-boot-starter-integration;3.3.3
springboot3_org.springframework.boot:spring-boot-starter-parent;3.3.3
Expand Down
1 change: 1 addition & 0 deletions eng/versioning/version_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ com.azure.spring:spring-cloud-azure-core;5.15.0;5.16.0-beta.1
com.azure.spring:spring-cloud-azure-actuator-autoconfigure;5.15.0;5.16.0-beta.1
com.azure.spring:spring-cloud-azure-actuator;5.15.0;5.16.0-beta.1
com.azure.spring:spring-cloud-azure-autoconfigure;5.15.0;5.16.0-beta.1
com.azure.spring:spring-cloud-azure-docker-compose;5.16.0-beta.1;5.16.0-beta.1
com.azure.spring:spring-cloud-azure-resourcemanager;5.15.0;5.16.0-beta.1
com.azure.spring:spring-cloud-azure-service;5.15.0;5.16.0-beta.1
com.azure.spring:spring-cloud-azure-starter-active-directory;5.15.0;5.16.0-beta.1
Expand Down
5 changes: 5 additions & 0 deletions sdk/boms/spring-cloud-azure-dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,11 @@
<artifactId>spring-cloud-azure-starter-jdbc-postgresql</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>spring-cloud-azure-docker-compose</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>spring-cloud-azure-testcontainers</artifactId>
Expand Down
1 change: 1 addition & 0 deletions sdk/spring/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Upgrade Spring Boot dependencies version to 3.3.3 and Spring Cloud dependencies
#### Dependency Updates
- Upgrade `azure-sdk-bom` to 1.2.26.
- Added a new dependency: `spring-cloud-azure-testcontainers`.
- Added a new dependency: `spring-cloud-azure-docker-compose`.

### Spring Cloud Azure Autoconfigure
This section includes changes in `spring-cloud-azure-autoconfigure` module.
Expand Down
2 changes: 2 additions & 0 deletions sdk/spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
<module>spring-cloud-azure-starter-jdbc-mysql</module>
<module>spring-cloud-azure-starter-jdbc-postgresql</module>
<module>spring-cloud-azure-testcontainers</module>
<module>spring-cloud-azure-docker-compose</module>
<module>spring-cloud-azure-integration-tests</module>
<module>spring-cloud-azure-integration-test-appconfiguration-config</module>
<module>spring-cloud-azure-appconfiguration-config</module>
Expand Down Expand Up @@ -123,6 +124,7 @@
<module>spring-cloud-azure-starter-jdbc-mysql</module>
<module>spring-cloud-azure-starter-jdbc-postgresql</module>
<module>spring-cloud-azure-testcontainers</module>
<module>spring-cloud-azure-docker-compose</module>
<module>spring-cloud-azure-integration-test-appconfiguration-config</module>
<module>spring-cloud-azure-appconfiguration-config</module>
<module>spring-cloud-azure-appconfiguration-config-web</module>
Expand Down
11 changes: 11 additions & 0 deletions sdk/spring/spring-cloud-azure-docker-compose/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Release History

## 5.15.0-beta.1 (Unreleased)

### Features Added

### Breaking Changes

### Bugs Fixed

### Other Changes
Empty file.
194 changes: 194 additions & 0 deletions sdk/spring/spring-cloud-azure-docker-compose/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>com.azure</groupId>
<artifactId>azure-client-sdk-parent</artifactId>
<version>1.7.0</version> <!-- {x-version-update;com.azure:azure-client-sdk-parent;current} -->
<relativePath>../../parents/azure-client-sdk-parent</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

<groupId>com.azure.spring</groupId>
<artifactId>spring-cloud-azure-docker-compose</artifactId>
<version>5.16.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-docker-compose;current} -->

<name>Spring Cloud Azure Docker Compose</name>
<description>Spring Cloud Azure Docker Compose</description>
<url>https://microsoft.github.io/spring-cloud-azure</url>
<developers>
<developer>
<name>Spring Cloud Azure</name>
<email>SpringIntegSupport@microsoft.com</email>
</developer>
</developers>
<scm>
<connection>scm:git:git@github.com:Azure/azure-sdk-for-java.git</connection>
<developerConnection>scm:git:ssh://git@github.com:Azure/azure-sdk-for-java.git</developerConnection>
<url>https://github.com/Azure/azure-sdk-for-java</url>
</scm>
<issueManagement>
<system>GitHub</system>
<url>https://github.com/Azure/azure-sdk-for-java/issues</url>
</issueManagement>
<properties>
<!-- Enables fail on deprecated API usage. -->
<compiler.failondeprecatedstatus/>
<jacoco.skip>true</jacoco.skip>
</properties>
<dependencies>
<dependency>
<groupId>com.azure.spring</groupId>
<artifactId>spring-cloud-azure-autoconfigure</artifactId>
<version>5.16.0-beta.1</version> <!-- {x-version-update;com.azure.spring:spring-cloud-azure-autoconfigure;current} -->
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-storage-blob</artifactId>
<version>12.27.1</version> <!-- {x-version-update;com.azure:azure-storage-blob;dependency} -->
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-storage-queue</artifactId>
<version>12.22.1</version> <!-- {x-version-update;com.azure:azure-storage-queue;dependency} -->
<optional>true</optional>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-docker-compose</artifactId>
<version>3.3.3</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-docker-compose;external_dependency} -->
</dependency>
<!-- Added this dependency to include necessary annotations used by reactor core.
Without this dependency, javadoc throws a warning as it cannot find enum When.MAYBE
which is used in @Nullable annotation in reactor core classes -->
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>3.0.2</version> <!-- {x-version-update;springboot3_com.google.code.findbugs:jsr305;external_dependency} -->
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-test</artifactId>
<version>3.3.3</version> <!-- {x-version-update;springboot3_org.springframework.boot:spring-boot-test;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>6.1.12</version> <!-- {x-version-update;springboot3_org.springframework:spring-test;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.10.3</version> <!-- {x-version-update;springboot3_org.junit.jupiter:junit-jupiter;external_dependency} -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.25.3</version> <!-- {x-version-update;springboot3_org.assertj:assertj-core;external_dependency} -->
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-maven-plugin</artifactId>
<version>4.8.2.0</version> <!-- {x-version-update;springboot3_com.github.spotbugs:spotbugs-maven-plugin;external_dependency} -->
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.30.0</version> <!-- {x-version-update;springboot3_com.diffplug.spotless:spotless-maven-plugin;external_dependency} -->
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.revapi</groupId>
<artifactId>revapi-maven-plugin</artifactId>
<version>0.14.6</version> <!-- {x-version-update;springboot3_org.revapi:revapi-maven-plugin;external_dependency} -->
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>com.azure.tools</groupId>
<artifactId>codesnippet-maven-plugin</artifactId>
<version>1.0.0-beta.10</version> <!-- {x-version-update;com.azure.tools:codesnippet-maven-plugin;external_dependency} -->
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-compiler-plugin;external_dependency} -->
<executions>
<!-- disabled - the executing this after default-compile will generate module-info with major class version 55 (i.e Java 11) -->
<execution>
<id>base-modules-compile</id>
<phase>none</phase>
</execution>
<!-- disabled - compile without module-info for Java 8 -->
<execution>
<id>base-compile</id>
<phase>none</phase>
</execution>
<!-- disabled - compile with Java 8 -->
<execution>
<id>base-testCompile</id>
<phase>none</phase>
</execution>
<!-- Ensure we compile with Java 17 -->
<execution>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<release>17</release>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.4.1</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-enforcer-plugin;external_dependency} -->
<configuration>
<rules>
<bannedDependencies>
<includes>
<include>org.springframework.boot:spring-boot-docker-compose:[3.3.3]</include> <!-- {x-include-update;springboot3_org.springframework.boot:spring-boot-docker-compose;external_dependency} -->
</includes>
</bannedDependencies>
</rules>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.4.2</version> <!-- {x-version-update;springboot3_org.apache.maven.plugins:maven-jar-plugin;external_dependency} -->
<configuration>
<archive>
<manifestEntries>
<Automatic-Module-Name>com.azure.spring.cloud.docker.compose</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

package com.azure.spring.cloud.docker.compose.implementation.service.connection.storage;

import com.azure.spring.cloud.autoconfigure.implementation.storage.blob.properties.AzureStorageBlobConnectionDetails;
import org.springframework.boot.docker.compose.core.RunningService;
import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionDetailsFactory;
import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionSource;

class StorageBlobDockerComposeConnectionDetailsFactory
extends DockerComposeConnectionDetailsFactory<AzureStorageBlobConnectionDetails> {

private static final int STORAGE_BLOB_PORT = 10_000;

protected StorageBlobDockerComposeConnectionDetailsFactory() {
super("azure-storage/azurite");
}

@Override
protected AzureStorageBlobConnectionDetails getDockerComposeConnectionDetails(DockerComposeConnectionSource source) {
return new StorageBlobContainerConnectionDetails(source.getRunningService());
}

/**
* {@link AzureStorageBlobConnectionDetails} backed by a {@code Storage Blob}
* {@link RunningService}.
*/
private static class StorageBlobContainerConnectionDetails extends DockerComposeConnectionDetails
implements AzureStorageBlobConnectionDetails {

private final String host;

private final int port;

StorageBlobContainerConnectionDetails(RunningService service) {
super(service);
this.host = service.host();
this.port = service.ports().get(STORAGE_BLOB_PORT);
}

@Override
public String getConnectionString() {
return "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://%s:%d/devstoreaccount1;"
.formatted(this.host, this.port);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

package com.azure.spring.cloud.docker.compose.implementation.service.connection.storage;

import com.azure.spring.cloud.autoconfigure.implementation.storage.blob.properties.AzureStorageBlobConnectionDetails;
import com.azure.spring.cloud.autoconfigure.implementation.storage.queue.properties.AzureStorageQueueConnectionDetails;
import org.springframework.boot.docker.compose.core.RunningService;
import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionDetailsFactory;
import org.springframework.boot.docker.compose.service.connection.DockerComposeConnectionSource;

class StorageQueueDockerComposeConnectionDetailsFactory
extends DockerComposeConnectionDetailsFactory<AzureStorageQueueConnectionDetails> {

private static final int STORAGE_QUEUE_PORT = 10_001;

protected StorageQueueDockerComposeConnectionDetailsFactory() {
super("azure-storage/azurite");
}

@Override
protected AzureStorageQueueConnectionDetails getDockerComposeConnectionDetails(DockerComposeConnectionSource source) {
return new StorageQueueContainerConnectionDetails(source.getRunningService());
}

/**
* {@link AzureStorageBlobConnectionDetails} backed by a {@code Storage Queue}
* {@link RunningService}.
*/
private static class StorageQueueContainerConnectionDetails extends DockerComposeConnectionDetails
implements AzureStorageQueueConnectionDetails {

private final String host;

private final int port;

StorageQueueContainerConnectionDetails(RunningService service) {
super(service);
this.host = service.host();
this.port = service.ports().get(STORAGE_QUEUE_PORT);
}

@Override
public String getConnectionString() {
return "DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;QueueEndpoint=http://%s:%d/devstoreaccount1;"
.formatted(this.host, this.port);
}

@Override
public String getEndpoint() {
return "http://%s:%d".formatted(this.host, this.port);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
org.springframework.boot.autoconfigure.service.connection.ConnectionDetailsFactory=\
com.azure.spring.cloud.docker.compose.implementation.service.connection.storage.StorageBlobDockerComposeConnectionDetailsFactory,\
com.azure.spring.cloud.docker.compose.implementation.service.connection.storage.StorageQueueDockerComposeConnectionDetailsFactory
Loading