From 12d39d3873ced59a1b10f8ce3a7a90c33328641c Mon Sep 17 00:00:00 2001 From: "Determe, Sebastien (sd378r)" Date: Tue, 15 May 2018 13:52:47 +0200 Subject: 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) --- .../org/onap/clamp/clds/config/spring/CldsConfiguration.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/main/java/org') 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; } -- cgit 1.2.3-korg