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
It simply means you have downloaded a spring starter code with database dependency without configuring your database. So it doesn't know how to connect. For Spring boot version 2.18 do the below steps to fix it.
mysql/mongo etc.In your applications.properties file add the db connection info. Sample is given for mysql if your db is mongo change it for mongo.
spring.datasource.url=jdbc:mysql://localhost:3306/db_name_that_you_created
spring.datasource.username=your_db_username_here
spring.datasource.password=your_db_pass_here
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.jpa.database-platform = org.hibernate.dialect.MySQL5Dialect
spring.jpa.generate-ddl=true
spring.jpa.hibernate.ddl-auto = update