I am working on a Spring Boot Batch example with MongoDB and I have already started the mongod
server.
When I launch my application, I
This link helped.
Spring Boot auto-configuration tries to configure beans automatically based on the dependencies added to the classpath. And because we have a JPA dependency (spring-data-starter-jpa) on our classpath, it tries to configure it.
The problem: Spring boot doesn't have the all the info needed to configure the JPA data source i.e. the JDBC connection properties. Solutions:
The above link excludes the DataSourceAutoConfiguration.class
with
@SpringBootApplication(exclude={DataSourceAutoConfiguration.class})
But this didn't work for me. I instead, had to exclude 2 AutoConfig classes:
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, XADataSourceAutoConfiguration.class})