Spring Boot - Cannot determine embedded database driver class for database type NONE
You haven't provided Spring Boot with enough information to auto-configure a DataSource
. To do so, you'll need to add some properties to application.properties
with the spring.datasource
prefix. Take a look at DataSourceProperties to see all of the properties that you can set.
You'll need to provide the appropriate url and driver class name:
spring.datasource.url = …
spring.datasource.driver-class-name = …
If you want to use embedded H2 database from Spring Boot starter add the below dependency to your pom file.
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.3.156</version>
</dependency>
But as mentioned in comments, the embedded H2 database keeps data in memory and doesn't stores it permanently.
I'd the same problem and excluding the DataSourceAutoConfiguration solved the problem.
@SpringBootApplication
@EnableAutoConfiguration(exclude={DataSourceAutoConfiguration.class})
public class RecommendationEngineWithCassandraApplication {
public static void main(String[] args) {
SpringApplication.run(RecommendationEngineWithCassandraApplication.class, args);
}
}
This worked for me (1.3.0.M5) :
import org.springframework.boot.autoconfigure.jdbc.*;
import org.springframework.boot.autoconfigure.orm.jpa.*;
@Configuration
@EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class})
public class Application {
Exclude both classes.
It did not work with
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, HibernateJpaAutoConfiguration.class})