I need to change schema name for every request. I am using SpringBoot JdbcTemplate as below:
jdbcTemplate.execute("set search_path = " + schemaName); //postgres
Few requests are successful and few are failing with table not found exception. When I checked in DB, schema and table exists. Somehow jdbcTemplate not able to perform request.
Is there any other way to change schema name on every request dynamically?
I am only using spring-boot-starter-data-jdbc. No jpa used/needed in project.