import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
import org.springframework.stereotype.Component;
-@PropertySource(value = {"file:/opt/app/music/etc/music.properties", "classpath:/project.properties","file:/opt/app/music/etc/key.properties"})
+@PropertySource(value = {"file:/opt/app/music/etc/music.properties", "classpath:/project.properties"})
+//"file:/opt/app/music/etc/key.properties"
@Component
public class PropertiesLoader implements InitializingBean {
@Value("${create.lock.wait.increment.ms}")
private int createLockWaitIncrement;
-
+
@Value("${transId.header.prefix}")
private String transIdPrefix;
@Value("${music.aaf.ns}")
private String musicAafNs;
- @Value("${cipher.enc.key}")
+ @Value("${cipher.enc.key:}")
private String cipherEncKey;
@SuppressWarnings("unused")
// TODO Auto-generated method stub
}
+
+ /* For unit testing purpose only*/
+ protected void setProperties() {
+ cassandraHost = "127.0.0.1";
+ debug = "true";
+ version = "x.x.x";
+ build = "y.y";
+ musicProperties = "property";
+ lockLeasePeriod = "5000";
+ cassandraUser = "user";
+ cassandraPassword = "password";
+ cassandraPort = "8007";
+ cassandraConnectTimeOutMS = "1000";
+ cassandraReadTimeOutMS = "1000";
+ isCadi = "true";
+ isKeyspaceActive = "true";
+ rertryCount = "20";
+ transIdPrefix = "transId-";
+ conversationIdPrefix = "conversation-";
+ clientIdPrefix = "clientId-";
+ messageIdPrefix = "messageId-";
+ transIdRequired = true;
+ conversationIdRequired = true;
+ clientIdRequired = true;
+ messageIdRequired = true;
+ musicAafNs = "ns";
+ cipherEncKey = "key";
+ }
}