on-internet
← Community

How to configure a second DataSource using JdbcTemplate in Spring Boot? [closed]

Stack Overflow ·

I have a Spring Boot application that currently works with one Oracle database schema using Spring Data JPA. Now, I need to access another schema within the same database using JdbcTemplate, without affecting the existing implementation. My requirement: Existing schema → Spring Data JPA New schema → JdbcTemplate How can I configure a second DataSource and its corresponding JdbcTemplate to access the other schema while keeping the existing JPA configuration intact? Is defining a separate DataSource and JdbcTemplate bean using @Qualifier, while keeping the existing datasource as @Primary, the ri

Comments

Sign in or sign up to comment and upvote.

No comments yet.