Skip to content
This repository was archived by the owner on Jun 13, 2025. It is now read-only.

Commit 7511aab

Browse files
Merge pull request #533 from International-Data-Spaces-Association/532_ConfigProperties_error_messages
feat: add spring validation to ConfigProperties
2 parents 1a80513 + 3bdb266 commit 7511aab

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ All notable changes to this project will be documented in this file.
1414
### Patch Change: Infomodel Maintenance
1515
- Update infomodel artifacts: java (v5.0.0), serializer (v5.0.0), interaction (v5.0.0) ([PR 545](https://github.com/International-Data-Spaces-Association/IDS-Messaging-Services/pull/545))
1616

17+
### Patch Change: Other
18+
- Added spring validation to ConfigProperties ([PR 533](https://github.com/International-Data-Spaces-Association/IDS-Messaging-Services/pull/533))
19+
1720
### Patch Change: Dependency Maintenance
1821
- Upgrade: com.puppycrawl.tools:checkstyle 10.2 -> 10.3 ([PR 539](https://github.com/International-Data-Spaces-Association/IDS-Messaging-Services/pull/539))
1922
- Upgrade: org.springframework:spring-web 5.3.20 -> 5.3.21 ([PR 561](https://github.com/International-Data-Spaces-Association/IDS-Messaging-Services/pull/561))

core/src/main/java/ids/messaging/core/config/ConfigProperties.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,41 +15,50 @@
1515
*
1616
* Contributors:
1717
* sovity GmbH
18+
* Fraunhofer Institute for Transportation and Infrastructure Systems
1819
*
1920
*/
2021
package ids.messaging.core.config;
2122

2223
import lombok.Data;
2324
import org.springframework.boot.context.properties.ConfigurationProperties;
25+
import org.springframework.validation.annotation.Validated;
26+
27+
import javax.validation.constraints.NotNull;
2428

2529
/**
2630
* Set of Properties to configure the imported configuration at startup.
2731
* Properties should be added to the application.properties file.
2832
*/
2933
@Data
34+
@Validated
3035
@ConfigurationProperties(prefix = "configuration")
3136
public class ConfigProperties {
3237
/**
3338
* Path to a configuration File (JsonLD representation of
3439
* a {@link de.fraunhofer.iais.eis.ConfigurationModel}.
3540
*/
41+
@NotNull
3642
private String path;
3743

3844
/**
3945
* Password for the IDSKeystore configured in the
4046
* {@link de.fraunhofer.iais.eis.ConfigurationModel} keyStore field.
4147
*/
4248

49+
@NotNull
4350
private String keyStorePassword;
4451

4552
/**
4653
* Alias of the connectors private key (used for signing DAT Requests).
4754
*/
55+
@NotNull
4856
private String keyAlias;
4957

5058
/**
5159
* Password for the IDSTruststore configured in the
5260
* {@link de.fraunhofer.iais.eis.ConfigurationModel} trustStore field.
5361
*/
62+
@NotNull
5463
private String trustStorePassword;
5564
}

0 commit comments

Comments
 (0)