diff options
author | Eddy Hautot <eh552t@intl.att.com> | 2017-09-14 08:40:15 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2017-09-14 08:40:15 +0000 |
commit | 48bc4366e2f9b538c1f4429e61e42cbc1590db7c (patch) | |
tree | 103bd52091d788a21bf08b8098e5735879f59489 /src | |
parent | bcbdd0682215f718827db8827519050544d8c78e (diff) | |
parent | 367b2a23d5149f26b51fedee04667f07ed7b6c97 (diff) |
Merge "Rework the datasource access"
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/onap/clamp/clds/config/CldsConfiguration.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/main/java/org/onap/clamp/clds/config/CldsConfiguration.java b/src/main/java/org/onap/clamp/clds/config/CldsConfiguration.java index fa0ca961..c00deea6 100644 --- a/src/main/java/org/onap/clamp/clds/config/CldsConfiguration.java +++ b/src/main/java/org/onap/clamp/clds/config/CldsConfiguration.java @@ -52,6 +52,7 @@ import org.onap.clamp.clds.dao.CldsDao; import org.onap.clamp.clds.model.refprop.RefProp; import org.onap.clamp.clds.transform.XslTransformer; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.boot.autoconfigure.jdbc.DataSourceBuilder; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.context.ApplicationContext; @@ -67,7 +68,7 @@ public class CldsConfiguration { private ApplicationContext context; /** - * Clds Identity databse DataSource configuration + * Clds Identity database DataSource configuration */ @Bean(name = "cldsDataSource") @ConfigurationProperties(prefix = "spring.datasource.cldsdb") @@ -86,9 +87,9 @@ public class CldsConfiguration { } @Bean(name = "cldsDao") - public CldsDao getCldsDao() { + public CldsDao getCldsDao(@Qualifier("cldsDataSource") DataSource dataSource) { CldsDao cldsDao = new CldsDao(); - cldsDao.setDataSource(cldsDataSource()); + cldsDao.setDataSource(dataSource); return cldsDao; } |