1

I can see following error in my Intellij local for sometime now.

Caused by: java.lang.IllegalArgumentException: dataSource or dataSourceClassName or jdbcUrl is required.

I have multiple data-sources configured for my project. Something similar as given below.

dataSource-1:
  driverClassName: oracle.jdbc.OracleDriver
  jdbc-url: so-and-so

datasource-2:
  driver-class-name: org.postgresql.Driver
  url: so-and-so

As you notice above, somewhere I'm using driverClassName, somewhere the 3 words are separated by hyphens.

So do I need to maintain the same standard in Spring-boot 2.0 across the entire yml file?

By standard, I mean,

  • driverClassName word would be the same in all places (driver-class-name)
  • jdbc-url/url text also need to be the same jdbcUrl in all places

This link in stackOverFlow discusses the same.

Please note, the hikari-config setter methods read the values properly in all the config classes wherever they are used, no issues with that.

Any help would be welcome.

0 Answers0