Skip to content
Advertisement

Connecting multiple databases

I would like to connect my application with 2 different databases. This is what I have tried:

JavaScript

And so in application.properties I have added:

JavaScript

But Intellij tells me: Cannot resolve configuration property ‘spring.wald.datasource.url’

What am I doing wrong?

Advertisement

Answer

Instead of returning DataSource, you could return DataSourceProperties, like:

JavaScript

Also, the dependency spring-boot-configuration-processor will be required.

Important: After that’s done, you should rebuild your project.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement