I have two different mysql database from the same connection and would like to use both in my application.properties like this way:
spring.datasource.url=jdbc:mysql://localhost:3306/membership
spring.datasource.username=root
spring.datasource.password=
spring.datasource.url=jdbc:mysql://localhost:3306/finance
spring.datasource.username=root
spring.datasource.password=
But this is not allowed (duplicate key's). I have found this guide but this is to much code i think not a elegant solution, looks like workaround for simple problem. Are there better and much simpler solutions?
PS: I am new to spring boot.