SpringBoot DataSource configuration
jpa, spring, spring-boot
Solution
You should use `spring.datasource.url` to configure the JDBC URL rather than `spring.datasource.jdbcUrl`.
`spring.datasource.jdbcUrl` will work if the specific `DataSource` implementation that you're using has a `setJdbcUrl` method (HikariCP, for example) where as `spring.datasource.url` will work with any of the supported datasources.
Using `spring.datasource.url` also has the added benefit that you don't need to specify `spring.datasource.driverClassName` as it will be inferred from the url.
Problem
I'm trying to use the `application.properties` file to configure the datasource Spring Boot will have to use. I've put the following properties inside : ``` spring.datasource.driverClassName=org.postgresql.Driver spring.datasource.user=test spring.datasource.password=test spring.datasource.jdbcUrl=jdbc:postgresql://localhost:5432/test ``` The `application.properties` file is well used by other systems. But I can't get it to work for the automatic datasource configuration. I'm still getting this Exception : ``` org.springframework.beans.factory.BeanCreationException: Cannot determine embedded database url for database type NONE. ``` The postgresql driver is included and loaded. And I can configure the datasource using a `Configuration` class, and the same parameters as above. I've also added the `@EnableAutoConfiguration` and `@EnableJpaRepositories` to my `Application.class`. Any clues?