0
@Primary
@Bean(name = "business-test")
public DataSource dataSource() {
}

here I am creating a data source with bean name "business-test" but this value should come from another application manifest. is it possible to do so? or how can we achieve this?

Nikos Hidalgo
  • 3,666
  • 9
  • 25
  • 39
  • Please explain your use case in more detail. What consumer needs this to be configurable, and why? – chrylis -cautiouslyoptimistic- Apr 06 '20 at 08:45
  • @chrylis-onstrike- this bean need to be created inside a library but bean name need to be read from manifest.yml of other application and different application will use these bean and need to pass bean name from their application.. as i am trying to connect my application with multiple data sources so these multiple data sources defined in cup sevice of cf and configured in manifest.yml. let me know if you need more information – Md Tanweer Apr 06 '20 at 10:42
  • 1
    _Why_ do the "different applications [...] need to pass the bean name"? This is not usual in Spring applications. – chrylis -cautiouslyoptimistic- Apr 06 '20 at 15:02

0 Answers0