How to configure multiple DataSources (JPA + JdbcTemplate) in Spring Boot?
I have an existing Spring Boot application that uses Spring Data JPA with a configured DataSource. Now, I need to connect to the same Oracle database using different credentials. The second user has different permissions, and I only need JdbcTemplate for this connection (no JPA or Hibernate). My requirement: DataSourceJDBC URLCredentialsUsagePrimarySame URLUser ASpring Data JPASecondarySame URLUser BJdbcTemplate The credentials are provided by an external centralized configuration service. Questions: Can I configure two DataSource beans with the same JDBC URL but different credentials? Can I k
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.