Skip to content
Advertisement

Spring Boot 2 datasource by configuration does not work

I have an application.yml(!) for the configuration containing the following:

JavaScript

Which gives me the errormessage:

JavaScript

Doing it this way works:

JavaScript

Ideas? 🙂

Advertisement

Answer

Rename driverClassName to driver-class-name since Kebab case is preferred over Camel case in Spring Boot Auto Configuration properties.

If that doesn’t help then make sure that you didn’t turn off DataSourceAutoConfiguration feature. It usually may look like

JavaScript
Advertisement