Annotate Vault…Properties with @Validated to enable property validation.
Closes gh-96.
This commit is contained in:
@@ -15,10 +15,11 @@
|
||||
*/
|
||||
package org.springframework.cloud.vault.config.databases;
|
||||
|
||||
import org.hibernate.validator.constraints.NotEmpty;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.NotEmpty;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
/**
|
||||
* Configuration properties for Vault using the Apache Cassandra integration.
|
||||
@@ -27,6 +28,7 @@ import lombok.Data;
|
||||
*/
|
||||
@ConfigurationProperties("spring.cloud.vault.cassandra")
|
||||
@Data
|
||||
@Validated
|
||||
public class VaultCassandraProperties implements DatabaseSecretProperties {
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,10 +15,11 @@
|
||||
*/
|
||||
package org.springframework.cloud.vault.config.databases;
|
||||
|
||||
import org.hibernate.validator.constraints.NotEmpty;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.NotEmpty;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
/**
|
||||
* Configuration properties for Vault using the MongoDB integration.
|
||||
@@ -27,6 +28,7 @@ import lombok.Data;
|
||||
*/
|
||||
@ConfigurationProperties("spring.cloud.vault.mongodb")
|
||||
@Data
|
||||
@Validated
|
||||
public class VaultMongoProperties implements DatabaseSecretProperties {
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
package org.springframework.cloud.vault.config.databases;
|
||||
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.NotEmpty;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.cloud.vault.config.VaultSecretBackendDescriptor;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
/**
|
||||
* Configuration properties for Vault using the MySQL integration.
|
||||
@@ -13,6 +14,7 @@ import lombok.Data;
|
||||
*/
|
||||
@ConfigurationProperties("spring.cloud.vault.mysql")
|
||||
@Data
|
||||
@Validated
|
||||
public class VaultMySqlProperties
|
||||
implements DatabaseSecretProperties, VaultSecretBackendDescriptor {
|
||||
|
||||
|
||||
@@ -15,10 +15,11 @@
|
||||
*/
|
||||
package org.springframework.cloud.vault.config.databases;
|
||||
|
||||
import org.hibernate.validator.constraints.NotEmpty;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.NotEmpty;
|
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
/**
|
||||
* Configuration properties for Vault using the PostgreSQL integration.
|
||||
@@ -27,6 +28,7 @@ import lombok.Data;
|
||||
*/
|
||||
@ConfigurationProperties("spring.cloud.vault.postgresql")
|
||||
@Data
|
||||
@Validated
|
||||
public class VaultPostgreSqlProperties implements DatabaseSecretProperties {
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user