Skip to content
Permalink
Browse files
Merge pull request #7 from myrle-krantz/develop
Added validation of value range to rhythm properties.
  • Loading branch information
myrle-krantz committed May 24, 2017
2 parents 4cae7c5 + 4e7c4aa commit 9457c03b2bd75eae384540140145228dd699a6cb
Showing 1 changed file with 7 additions and 0 deletions.
@@ -15,8 +15,11 @@
*/
package io.mifos.rhythm.service.config;

import io.mifos.core.lang.validation.constraints.ValidIdentifier;
import org.hibernate.validator.constraints.Range;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;

import java.util.concurrent.TimeUnit;

@@ -25,8 +28,12 @@
*/
@Component
@ConfigurationProperties(prefix="rhythm")
@Validated
public class RhythmProperties {
@ValidIdentifier
private String user;

@Range(min=0, max=3_600_000)
private Long beatCheckRate = TimeUnit.MINUTES.toMillis(10);

public RhythmProperties() {

0 comments on commit 9457c03

Please sign in to comment.