Skip to content

Commit

Permalink
Merge pull request #533 from International-Data-Spaces-Association/53…
Browse files Browse the repository at this point in the history
…2_ConfigProperties_error_messages

feat: add spring validation to ConfigProperties
  • Loading branch information
SebastianOpriel authored Jun 22, 2022
2 parents 1a80513 + 3bdb266 commit 7511aab
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ All notable changes to this project will be documented in this file.
### Patch Change: Infomodel Maintenance
- 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))

### Patch Change: Other
- Added spring validation to ConfigProperties ([PR 533](https://github.com/International-Data-Spaces-Association/IDS-Messaging-Services/pull/533))

### Patch Change: Dependency Maintenance
- Upgrade: com.puppycrawl.tools:checkstyle 10.2 -> 10.3 ([PR 539](https://github.com/International-Data-Spaces-Association/IDS-Messaging-Services/pull/539))
- 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))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,41 +15,50 @@
*
* Contributors:
* sovity GmbH
* Fraunhofer Institute for Transportation and Infrastructure Systems
*
*/
package ids.messaging.core.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.validation.annotation.Validated;

import javax.validation.constraints.NotNull;

/**
* Set of Properties to configure the imported configuration at startup.
* Properties should be added to the application.properties file.
*/
@Data
@Validated
@ConfigurationProperties(prefix = "configuration")
public class ConfigProperties {
/**
* Path to a configuration File (JsonLD representation of
* a {@link de.fraunhofer.iais.eis.ConfigurationModel}.
*/
@NotNull
private String path;

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

@NotNull
private String keyStorePassword;

/**
* Alias of the connectors private key (used for signing DAT Requests).
*/
@NotNull
private String keyAlias;

/**
* Password for the IDSTruststore configured in the
* {@link de.fraunhofer.iais.eis.ConfigurationModel} trustStore field.
*/
@NotNull
private String trustStorePassword;
}

0 comments on commit 7511aab

Please sign in to comment.