Sprint Boot - Dynamic connection

Asked

Viewed 72 times

0

I have an application developed with Sprint Boot that currently connects to a single Oracle database using the settings of Application.properties. However, I need this application to connect to different databases, depending on the information chosen on the login screen, that is, on the login screen the user will choose which BD he wants to connect to. What’s the best way to do that?

1 answer

0

In the properties itself you can configure several products such as banks, queues and other technologies, but I saw that you commented that what defines the type of connection is user interaction.

My suggestion would be you configure your application to connect in the banks when starting and within the application you could create a service that will be responsible for knowing where things should be persisted, only by reinforcing all this connection configuration is done in the properties file

Big hug.

  • Hi Diogo, thanks for the reply. I believe I will have to follow this way even.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.