summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2018-05-15 13:52:47 +0200
committerDeterme, Sebastien (sd378r) <sd378r@intl.att.com>2018-05-15 13:54:25 +0200
commit12d39d3873ced59a1b10f8ce3a7a90c33328641c (patch)
tree8480bb59ba4d7ba970ae0ef36f6ed4442c9c6f15 /src/main/java
parentaa8d13e4fb8ea099c85969de91eff2d89190c366 (diff)
Fix log location
Fix log location so that it goes into /var/log/onap Issue-ID: CLAMP-161 Change-Id: Icec87579c7c7be8a0b4069e4152f7f964794c50c Signed-off-by: Determe, Sebastien (sd378r) <sd378r@intl.att.com>
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/onap/clamp/clds/config/spring/CldsConfiguration.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/main/java/org/onap/clamp/clds/config/spring/CldsConfiguration.java b/src/main/java/org/onap/clamp/clds/config/spring/CldsConfiguration.java
index 37de83308..8372e3f59 100644
--- a/src/main/java/org/onap/clamp/clds/config/spring/CldsConfiguration.java
+++ b/src/main/java/org/onap/clamp/clds/config/spring/CldsConfiguration.java
@@ -26,21 +26,28 @@ package org.onap.clamp.clds.config.spring;
import javax.sql.DataSource;
import javax.xml.transform.TransformerConfigurationException;
+import org.onap.clamp.clds.config.ClampProperties;
import org.onap.clamp.clds.config.EncodedPasswordBasicDataSource;
import org.onap.clamp.clds.dao.CldsDao;
import org.onap.clamp.clds.transform.XslTransformer;
+import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.config.PropertiesFactoryBean;
import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
-import org.springframework.core.io.ClassPathResource;
@Configuration
@Profile("clamp-default")
public class CldsConfiguration {
+ @Autowired
+ private ApplicationContext appContext;
+ @Autowired
+ private ClampProperties refProp;
+
/**
* Clds Identity database DataSource configuration
*
@@ -55,7 +62,7 @@ public class CldsConfiguration {
@Bean(name = "mapper")
public PropertiesFactoryBean mapper() {
PropertiesFactoryBean bean = new PropertiesFactoryBean();
- bean.setLocation(new ClassPathResource("system.properties"));
+ bean.setLocation(appContext.getResource(refProp.getStringValue("files.systemProperties")));
return bean;
}