I have two entities for my spring boot project one is Employees
@Entity
@Table(name = "Employees ",schema = "dbo")
public class Employees {
which is in test1 database and another one is Payroll
@Entity
@Table(name = "Payroll ",schema = "dbo")
public class Payroll {
which is in test2 database, In the application.properties files I have the
spring.datasource.url: jdbc:sqlserver://hostname.com;databaseName=test1
here jpa is looking both the table in test1 database since I have given that in spring.datasource.url
I need to know how to make jpa know the Payroll table is available in test2 database
In SQL SERVER Manangement studio we will do this by giving this SQL
select * from test2..Payroll
by this even if we are in test1 db we can access the table in test2 db