How to define a generic datasource in Spring Cloud Config

Is it possible to set up a DataSource with Spring Cloud where open JDBC connections could be injected into all my Spring Boot applications?

Something like looking in a JNDI server? If so, can anyone provide some examples or description of how to use this type of config?

+3


source to share


2 answers


DataSource

You can use Spring Cloud bootstrap config to build . I don't see much value in doing this over the normal Spring Boot autoconfiguration. Link: http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#boot-features-developing-auto-configuration .



+1


source


One solution I found out is to set all data source information to properties files that will be supplied by Spring Cloud Config Server for application clients. Therefore, client clients that create DataSources get these values ​​from the remote properties.



0


source







All Articles