Skip to content

Commit 4a2c386

Browse files
authored
Merge branch 'main' into feature/gh-2812-aws-s3-searchpaths
Signed-off-by: Geonwook Ham <tomy8964@naver.com>
2 parents 643060f + 12ab712 commit 4a2c386

447 files changed

Lines changed: 4223 additions & 2001 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 2 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
version: 2
22
updates:
3-
- package-ecosystem: "github-actions"
4-
directory: "/"
5-
target-branch: "4.1.x"
6-
schedule:
7-
interval: "weekly"
8-
- package-ecosystem: "github-actions"
9-
directory: "/"
10-
target-branch: "4.2.x"
11-
schedule:
12-
interval: "weekly"
133
- package-ecosystem: "github-actions"
144
directory: "/"
155
target-branch: "4.3.x"
@@ -24,18 +14,7 @@ updates:
2414
directory: /
2515
schedule:
2616
interval: daily
27-
target-branch: 4.1.x
28-
ignore:
29-
# only upgrade patch versions for maintenance branch
30-
- dependency-name: "*"
31-
update-types:
32-
- version-update:semver-major
33-
- version-update:semver-minor
34-
- package-ecosystem: maven
35-
directory: /
36-
schedule:
37-
interval: daily
38-
target-branch: 4.2.x
17+
target-branch: 4.3.x
3918
ignore:
4019
# only upgrade patch versions for maintenance branch
4120
- dependency-name: "*"
@@ -46,18 +25,13 @@ updates:
4625
directory: /
4726
schedule:
4827
interval: daily
49-
target-branch: 4.3.x
28+
target-branch: main
5029
ignore:
5130
# only upgrade patch versions for maintenance branch
5231
- dependency-name: "*"
5332
update-types:
5433
- version-update:semver-major
5534
- version-update:semver-minor
56-
- package-ecosystem: maven
57-
directory: /
58-
schedule:
59-
interval: daily
60-
target-branch: main
6135
- package-ecosystem: npm
6236
target-branch: docs-build
6337
directory: /
@@ -68,16 +42,6 @@ updates:
6842
directory: /docs
6943
schedule:
7044
interval: weekly
71-
- package-ecosystem: npm
72-
target-branch: 4.1.x
73-
directory: /docs
74-
schedule:
75-
interval: weekly
76-
- package-ecosystem: npm
77-
target-branch: 4.2.x
78-
directory: /docs
79-
schedule:
80-
interval: weekly
8145
- package-ecosystem: npm
8246
target-branch: 4.3.x
8347
directory: /docs

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Spring Cloud Config CI Job
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- 4.3.x
8+
- 4.2.x
9+
10+
# Scheduled builds run daily at midnight UTC
11+
schedule:
12+
- cron: '0 0 * * *'
13+
14+
# Manual trigger with optional branch override
15+
workflow_dispatch:
16+
inputs:
17+
branches:
18+
description: "Which branch should be built (can be a comma-separated list of branches)"
19+
required: true
20+
default: 'main'
21+
type: string
22+
23+
jobs:
24+
deploy:
25+
uses: spring-cloud/spring-cloud-github-actions/.github/workflows/deploy.yml@main
26+
with:
27+
branches: ${{ inputs.branches }}
28+
secrets:
29+
ARTIFACTORY_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
30+
ARTIFACTORY_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
31+
COMMERCIAL_ARTIFACTORY_USERNAME: ${{ secrets.COMMERCIAL_ARTIFACTORY_USERNAME }}
32+
COMMERCIAL_ARTIFACTORY_PASSWORD: ${{ secrets.COMMERCIAL_ARTIFACTORY_PASSWORD }}
33+
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
34+
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}

.github/workflows/deploy-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
# if: github.repository_owner == 'spring-cloud'
1717
steps:
1818
- name: Checkout
19-
uses: actions/checkout@v4
19+
uses: actions/checkout@v6
2020
with:
2121
ref: docs-build
2222
fetch-depth: 1

.github/workflows/maven.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ jobs:
1515
runs-on: ubuntu-latest
1616

1717
steps:
18-
- uses: actions/checkout@v4
18+
- uses: actions/checkout@v6
1919
- name: Set up JDK
20-
uses: actions/setup-java@v4
20+
uses: actions/setup-java@v5
2121
with:
2222
distribution: 'temurin'
2323
java-version: '17'
2424
- name: Cache local Maven repository
25-
uses: actions/cache@v4
25+
uses: actions/cache@v5
2626
with:
2727
path: ~/.m2/repository
2828
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
@@ -31,12 +31,12 @@ jobs:
3131
- name: Build with Maven
3232
run: ./mvnw -s .settings.xml clean org.jacoco:jacoco-maven-plugin:prepare-agent install -U -P sonar -nsu --batch-mode -Dmaven.test.redirectTestOutputToFile=true -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
3333
- name: Publish Test Report
34-
uses: mikepenz/action-junit-report@v5
34+
uses: mikepenz/action-junit-report@v6
3535
if: always() # always run even if the previous step fails
3636
with:
3737
report_paths: '**/surefire-reports/TEST-*.xml'
3838
- name: Archive code coverage results
39-
uses: actions/upload-artifact@v4
39+
uses: actions/upload-artifact@v7
4040
with:
4141
name: surefire-reports
4242
path: '**/surefire-reports/*'

README.adoc

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,13 @@ parsing or rendering it, just copying it to `${main.basedir}`
113113
any changes in the README it will then show up after a Maven build as
114114
a modified file in the correct place. Just commit it and push the change.
115115

116+
You can generate the docs site using the following command:
117+
118+
[indent=0]
119+
----
120+
./mvnw -pl docs -P docs antora:antora
121+
----
122+
116123
[[working-with-the-code]]
117124
== Working with the code
118125
If you don't have an IDE preference we would recommend that you use
@@ -156,20 +163,6 @@ The generated eclipse projects can be imported by selecting `import existing pro
156163
from the `file` menu.
157164

158165

159-
[[jce]]
160-
== JCE
161-
162-
If you get an exception due to "Illegal key size" and you are using Sun’s JDK, you need to install the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files.
163-
See the following links for more information:
164-
165-
https://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html[Java 6 JCE]
166-
167-
https://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html[Java 7 JCE]
168-
169-
https://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html[Java 8 JCE]
170-
171-
Extract the JCE files into the `JDK/jre/lib/security` folder for whichever version of JRE/JDK x64/x86 you use.
172-
173166
[[contributing]]
174167
= Contributing
175168

docs/modules/ROOT/nav.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
*** xref:server/environment-repository/aws-s3-backend.adoc[]
1515
*** xref:server/environment-repository/aws-parameter-store-backend.adoc[]
1616
*** xref:server/environment-repository/aws-secrets-manager-backend.adoc[]
17+
*** xref:server/environment-repository/gcp-secret-manager-backend.adoc[]
1718
*** xref:server/environment-repository/credhub-backend.adoc[]
1819
*** xref:server/environment-repository/mongo-backend.adoc[]
1920
*** xref:server/environment-repository/composite-repositories.adoc[]

docs/modules/ROOT/pages/quickstart.adoc

Lines changed: 87 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,97 @@
33

44
This quick start walks through using both the server and the client of Spring Cloud Config Server.
55

6-
First, start the server, as follows:
6+
First create a Spring Boot application with a dependency on `org.springframework.cloud:spring-cloud-config-server`.
77

8+
.pom.xml
9+
[source,xml]
10+
----
11+
...
12+
<properties>
13+
<java.version>21</java.version>
14+
<spring-cloud.version>2025.1.0</spring-cloud.version>
15+
</properties>
16+
<dependencies>
17+
<dependency>
18+
<groupId>org.springframework.cloud</groupId>
19+
<artifactId>spring-cloud-config-server</artifactId>
20+
</dependency>
21+
22+
<dependency>
23+
<groupId>org.springframework.boot</groupId>
24+
<artifactId>spring-boot-starter-test</artifactId>
25+
<scope>test</scope>
26+
</dependency>
27+
</dependencies>
28+
<dependencyManagement>
29+
<dependencies>
30+
<dependency>
31+
<groupId>org.springframework.cloud</groupId>
32+
<artifactId>spring-cloud-dependencies</artifactId>
33+
<version>${spring-cloud.version}</version>
34+
<type>pom</type>
35+
<scope>import</scope>
36+
</dependency>
37+
</dependencies>
38+
</dependencyManagement>
39+
...
40+
----
41+
42+
.build.gradle
43+
[source,json]
44+
----
45+
...
46+
ext {
47+
set('springCloudVersion', "2025.1.0")
48+
}
49+
50+
dependencies {
51+
implementation 'org.springframework.cloud:spring-cloud-config-server'
52+
}
53+
54+
dependencyManagement {
55+
imports {
56+
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
57+
}
58+
}
59+
...
860
----
9-
$ cd spring-cloud-config-server
10-
$ ../mvnw spring-boot:run
61+
62+
In the main application class add the `@EnableConfigServer` annotation.
63+
64+
.ConfigServerApplication.java
65+
[source,java]
1166
----
67+
@EnableConfigServer
68+
@SpringBootApplication
69+
public class ConfigServerApplication {
70+
71+
public static void main(String[] args) {
72+
new SpringApplicationBuilder(ConfigServerApplication.class).run(args);
73+
}
1274
13-
The server is a Spring Boot application, so you can run it from your IDE if you prefer to do so (the main class is `ConfigServerApplication`).
75+
}
76+
----
77+
78+
Finally in your `application.yaml` file (or `application.properties`) add the following properties.
79+
80+
.application.yaml
81+
[source,yaml]
82+
----
83+
spring:
84+
application:
85+
name: configserver
86+
cloud:
87+
config:
88+
server:
89+
git:
90+
uri: https://github.com/spring-cloud-samples/config-repo
91+
repos:
92+
- patterns: multi-repo-demo-*
93+
uri: https://github.com/spring-cloud-samples/config-repo
94+
server:
95+
port: 8888
96+
----
1497

1598
Next try out a client, as follows:
1699

docs/modules/ROOT/pages/server/aot-and-native-image-support.adoc

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@
44

55
Since `4.0.0`, Spring Cloud Config Server supports Spring AOT transformations. As of `4.1.0` it also supports GraalVM native images, as long as GraalVM 21 or higher is used, however it requires the user to add some workarounds for known GraalVM issues, as described below.
66

7+
[IMPORTANT]
78
====
8-
9-
IMPORTANT::
10-
Due to [a bug](https://github.com/oracle/graal/issues/5134) in Graal's `FileSystemProvider` a configuration workaround needs to be added to allow the Config Server to run as a native image. You will need to add the following options to your GraalVM build plugin setup (please refer to https://www.graalvm.org/[GraalVM] Maven or Gradle plugin documentation for more details):
9+
Due to https://github.com/oracle/graal/issues/5134[a bug] in Graal's `FileSystemProvider` a configuration workaround needs to be added to allow the Config Server to run as a native image. You will need to add the following options to your GraalVM build plugin setup (please refer to https://graalvm.github.io/native-build-tools/latest/maven-plugin.html[Maven plugin for GraalVM] or https://graalvm.github.io/native-build-tools/latest/gradle-plugin.html[Gradle plugin for GraalVM] for more details):
1110
1211
[source,indent=0]
1312
----
@@ -18,13 +17,11 @@ Due to [a bug](https://github.com/oracle/graal/issues/5134) in Graal's `FileSyst
1817
--initialize-at-run-time=org.bouncycastle.jcajce.provider.drbg.DRBG$Default
1918
--initialize-at-run-time=org.bouncycastle.jcajce.provider.drbg.DRBG$NonceAndIV
2019
----
21-
22-
NOTE:: Adding the additional build time initializations can affect performance, but it still may offer gains as compared to a regular JVM run. Make sure to measure and compare for your application.
23-
2420
====
2521

26-
TIP::
27-
If you are connecting with your config data backend over SSH, keep in mind that GraalVM requires https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/JCASecurityServices/#provider-registration[security provider registration using `java.security`]
22+
NOTE: Adding the additional build time initializations can affect performance, but it still may offer gains as compared to a regular JVM run. Make sure to measure and compare for your application.
23+
24+
TIP: If you are connecting with your config data backend over SSH, keep in mind that GraalVM requires https://www.graalvm.org/latest/reference-manual/native-image/dynamic-features/JCASecurityServices/#provider-registration[security provider registration using `java.security`]
2825

2926
WARNING: Refresh scope is not supported with native images. If you are going to run your config client application as a native image, make sure to set `spring.cloud.refresh.enabled` property to `false`.
3027

docs/modules/ROOT/pages/server/encryption-and-decryption.adoc

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
[[encryption-and-decryption]]
22
= Encryption and Decryption
33

4-
IMPORTANT: To use the encryption and decryption features you need the full-strength JCE installed in your JVM (it is not included by default).
5-
You can download the "`Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files`" from Oracle and follow the installation instructions (essentially, you need to replace the two policy files in the JRE lib/security directory with the ones that you downloaded).
6-
74
If the remote property sources contain encrypted content (values starting with `\{cipher}`), they are decrypted before sending to clients over HTTP.
85
The main advantage of this setup is that the property values need not be in plain text when they are "`at rest`" (for example, in a git repository).
96
If a value cannot be decrypted, it is removed from the property source and an additional property is added with the same key but prefixed with `invalid` and a value that means "`not applicable`" (usually `<n/a>`).

0 commit comments

Comments
 (0)