Skip to content

Commit d8fb058

Browse files
committed
Merge release '2.0.0'
This release increases the required Java compiler version 17. The project now compatible to Spring Boot 3 and contains a lot of changes regarding the project setup, like dependency management and source code linting. The API didn't change at all, besides the mentioned changes.
2 parents cce6cc3 + a3d0c2b commit d8fb058

32 files changed

Lines changed: 164 additions & 170 deletions

.github/workflows/maven.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,19 @@ name: Java CI with Maven
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [ main, develop ]
66
pull_request:
7-
branches: [ main ]
7+
branches: [ main, develop ]
88

99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v2
14-
- name: Set up AdoptOpenJDK 8
14+
- name: Set up AdoptOpenJDK 17
1515
uses: actions/setup-java@v2
1616
with:
17-
java-version: '8'
17+
java-version: '17'
1818
distribution: 'adopt'
1919
- name: Cache local Maven repository
2020
uses: actions/cache@v2

.idea/misc.xml

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2021 Vincent Nadoll
189+
Copyright 2023 Vincent Nadoll
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,10 @@ own post-processor, use the API artifact, which is available separately.
1212
Spring Boot Secrets is ideal for resolving **Docker Secrets** and making them
1313
accessible to the Spring Boot application.
1414

15-
**Note:** Compatible with Spring Boot > 2.4.4
15+
**Note:** Compatible with Spring Boot 3. Checkout the [v1.x] releases for a
16+
Spring Boot 2-compatible version of this project.
17+
18+
[v1.x]: https://github.com/V1ncNet/secrets-spring-boot/tree/v1.1.1
1619

1720

1821
Features
@@ -88,8 +91,8 @@ The collection is available under following coordinates:
8891
```xml
8992
<dependency>
9093
<groupId>de.vinado.boot</groupId>
91-
<artifactId>spring-boot-secrets</artifactId>
92-
<version>1.1.1</version>
94+
<artifactId>secrets</artifactId>
95+
<version>2.0.0</version>
9396
</dependency>
9497
```
9598

@@ -99,8 +102,8 @@ post-processors:
99102
```xml
100103
<dependency>
101104
<groupId>de.vinado.boot</groupId>
102-
<artifactId>spring-boot-secrets-api</artifactId>
103-
<version>1.1.1</version>
105+
<artifactId>secrets-api</artifactId>
106+
<version>2.0.0</version>
104107
</dependency>
105108
```
106109

@@ -177,7 +180,7 @@ Configuration
177180
-------------
178181

179182
| application.properties | Data Type | Default Value | Example | Post-Processor |
180-
| ----------------------- | ---------- | -------------- | -------------------------------------------------------------------- | ------------------------------------------------------ |
183+
|-------------------------|------------|----------------|----------------------------------------------------------------------|--------------------------------------------------------|
181184
| secrets.file.properties | _`Map`_ | | `spring.datasource.username=/run/secrets/spring.datasource.username` | `FilenameConfigDataSecretsEnvironmentPostProcessor` |
182185
| secrets.file.base-dir | _`String`_ | `/run/secrets` | `/some/base/directory` | `FilenameSecretsEnvironmentPostProcessor` |
183186
| secrets.file.separator | _`String`_ | `.` | Only `.` or `_` | `FilenameSecretsEnvironmentPostProcessor` |

api/pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66

77
<parent>
88
<groupId>de.vinado.boot</groupId>
9-
<artifactId>spring-boot-secrets-parent</artifactId>
10-
<version>1.1.1</version>
9+
<artifactId>secrets-parent</artifactId>
10+
<version>2.0.0</version>
1111
</parent>
1212

13-
<artifactId>spring-boot-secrets-api</artifactId>
13+
<artifactId>secrets-api</artifactId>
1414
<name>String Boot Secrets API</name>
1515
<description>Extensible Secrets Post-Processor components</description>
16-
<url>https://github.com/V1ncNet/spring-boot-secrets.git</url>
16+
<url>https://github.com/V1ncNet/secrets-spring-boot.git</url>
1717

1818
<dependencies>
1919
<dependency>

api/src/main/java/de/vinado/boot/secrets/CompositePropertyIndexSupplier.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ public static Builder overriding() {
104104

105105

106106
/**
107-
* Creates a new {@link Builder} using the given merge function to handle duplicate keys during {@link #get()
108-
* merge}.
107+
* Creates a new {@link Builder} using the given merge function to handle duplicate keys during
108+
* {@link #get() merge}.
109109
*
110110
* @return a new instance of {@link Builder}
111111
*/
@@ -115,8 +115,8 @@ public static Builder using(BinaryOperator<String> mergeFunction) {
115115
}
116116

117117
/**
118-
* Convenience component making use of the Builder Pattern to instantiate a new {@link
119-
* CompositePropertyIndexSupplier}.
118+
* Convenience component making use of the Builder Pattern to instantiate a new
119+
* {@link CompositePropertyIndexSupplier}.
120120
*
121121
* @author Vincent Nadoll
122122
*/

api/src/main/java/de/vinado/boot/secrets/PropertyIndexSupplier.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ default Function<Map.Entry<?, String>, String> substituteValue(PropertyResolver
5353
* Substitutes the entry's value.
5454
*
5555
* @param resolver the component that resolves system property
56-
* @return a function which substitutes the its argument
56+
* @return a function which substitutes its argument
5757
*/
5858
default UnaryOperator<String> substitute(PropertyResolver resolver) {
5959
Assert.notNull(resolver, "Property resolver must not be null");

api/src/main/java/de/vinado/boot/secrets/SecretsEnvironment.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
import static de.vinado.boot.secrets.Utils.acceptAndLog;
1313

1414
/**
15-
* A wrapper around {@link ConfigurableEnvironment} which loads secrets and applies them to {@link
16-
* SecretPropertiesPropertySource}.
15+
* A wrapper around {@link ConfigurableEnvironment} which loads secrets and applies them to
16+
* {@link SecretPropertiesPropertySource}.
1717
*
1818
* @author Vincent Nadoll
1919
*/

api/src/main/java/de/vinado/boot/secrets/SecretsEnvironmentPostProcessor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212

1313
/**
1414
* <p>
15-
* An {@link EnvironmentPostProcessor} that loads and applies a {@link SecretsEnvironment} to Spring's {@link
16-
* org.springframework.core.env.Environment}.
15+
* An {@link EnvironmentPostProcessor} that loads and applies a {@link SecretsEnvironment} to Spring's
16+
* {@link org.springframework.core.env.Environment}.
1717
* </p><p>
1818
* This component implements {@link Ordered} to draw attention to the fact, that {@link SecretsEnvironmentPostProcessor}
1919
* must be executed after {@link ConfigDataEnvironmentPostProcessor} in order to override configuration properties. I'd

api/src/test/java/de/vinado/boot/secrets/CompositePropertyIndexSupplierTest.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414
import static org.mockito.Mockito.spy;
1515
import static org.mockito.Mockito.when;
1616

17-
/**
18-
* @author Vincent Nadoll
19-
*/
2017
class CompositePropertyIndexSupplierTest {
2118

2219
private ConfigurableEnvironment environment;
@@ -89,9 +86,9 @@ void buildThenSubstitute_shouldEqualBuildAndSubstituteResult() {
8986
.add(PropertyIndexSupplier.from(second));
9087

9188
Map<String, String> buildThenSubstitute = builder.build().substituteValues(environment).get();
92-
Map<String, String> BuildAndSubstitute = builder.buildAndSubstitute(environment).get();
89+
Map<String, String> buildAndSubstitute = builder.buildAndSubstitute(environment).get();
9390

94-
assertEquals(buildThenSubstitute, BuildAndSubstitute);
91+
assertEquals(buildThenSubstitute, buildAndSubstitute);
9592
}
9693

9794
@Test

0 commit comments

Comments
 (0)