Commit 96e9f232 authored by ipatini's avatar ipatini
Browse files

EMS: Util, Control Service: Added 'EmsConstant.EMS_PROPERTIES_PREFIX' constant...

EMS: Util, Control Service: Added 'EmsConstant.EMS_PROPERTIES_PREFIX' constant (value: ""). Prepended EMS_PROPERTIES_PREFIX in all Control Service properties classes and @Value-annotated fields
parent f00fa7bb
......@@ -23,11 +23,13 @@ import javax.validation.constraints.Min;
import java.util.Arrays;
import java.util.List;
import static eu.melodic.event.util.EmsConstant.EMS_PROPERTIES_PREFIX;
@Slf4j
@Data
@Validated
@Configuration
@ConfigurationProperties(prefix = "control")
@ConfigurationProperties(prefix = EMS_PROPERTIES_PREFIX + "control")
@PropertySource("file:${MELODIC_CONFIG_DIR}/eu.melodic.event.control.properties")
public class ControlServiceProperties {
public enum IpSetting {
......@@ -41,11 +43,11 @@ public class ControlServiceProperties {
private boolean printBuildInfo;
@Value("${IP_SETTING}")
@Value("${" + EMS_PROPERTIES_PREFIX + "IP_SETTING}")
private IpSetting ipSetting = IpSetting.PUBLIC_IP;
@Value("${EXECUTIONWARE}")
@Value("${" + EMS_PROPERTIES_PREFIX + "EXECUTIONWARE}")
private ExecutionWare executionware = ExecutionWare.PROACTIVE;
@Value("${password-encoder-class:}")
@Value("${" + EMS_PROPERTIES_PREFIX + "password-encoder-class:}")
private String passwordEncoderClass;
private String upperwareGrouping;
......
......@@ -9,6 +9,7 @@
package eu.melodic.event.control.properties;
import eu.melodic.event.util.EmsConstant;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
......@@ -24,7 +25,7 @@ import java.util.List;
@Data
@Validated
@Configuration
@ConfigurationProperties(prefix = "info")
@ConfigurationProperties(prefix = EmsConstant.EMS_PROPERTIES_PREFIX + "info")
public class InfoServiceProperties {
@Min(1)
private long metricsUpdateInterval = 1000;
......
......@@ -9,6 +9,7 @@
package eu.melodic.event.control.properties;
import eu.melodic.event.util.EmsConstant;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
......@@ -23,7 +24,7 @@ import java.util.Map;
@Data
@Validated
@Configuration
@ConfigurationProperties(prefix = "static")
@ConfigurationProperties(prefix = EmsConstant.EMS_PROPERTIES_PREFIX + "static")
public class StaticResourceProperties {
private String faviconContext = "/favicon.ico";
private String faviconPath;
......
......@@ -9,6 +9,7 @@
package eu.melodic.event.control.properties;
import eu.melodic.event.util.EmsConstant;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
......@@ -23,7 +24,7 @@ import java.util.Set;
@Data
@Validated
@Configuration
@ConfigurationProperties(prefix = "beacon")
@ConfigurationProperties(prefix = EmsConstant.EMS_PROPERTIES_PREFIX + "beacon")
public class TopicBeaconProperties {
private boolean enabled = true;
@Min(0) private long initialDelay = 60000;
......
......@@ -9,6 +9,7 @@
package eu.melodic.event.control.properties;
import eu.melodic.event.util.EmsConstant;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
......@@ -25,7 +26,7 @@ import java.util.List;
@Data
@Validated
@Configuration
@ConfigurationProperties(prefix = "web")
@ConfigurationProperties(prefix = EmsConstant.EMS_PROPERTIES_PREFIX + "web")
public class WebSecurityProperties {
// JWT Token authentication
@Valid
......
......@@ -13,5 +13,6 @@ package eu.melodic.event.util;
* EMS constant
*/
public class EmsConstant {
public final static String EMS_PROPERTIES_PREFIX = ""; //""ems.";
public final static String EVENT_PROPERTY_SOURCE_ADDRESS = "producer-host";
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment