skip to Main Content

Mongodb – Error creating bean with name 'mongoDatabaseFactory'

Error creating bean with name 'mongoDatabaseFactory' defined in class path resource [path]: Failed to instantiate [path]: Factory method 'mongoDatabaseFactory' threw exception with message: Database name must not be empty. MoviesApplication.java package dev.jeevan.movies; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class MoviesApplication…

VIEW QUESTION

Postgresql – why I getting this error on write query in JPA repository in spring-boot?

package com.example.demo.Repository; import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.stereotype.Repository; import com.example.demo.entity.WomenCareEntity; @Repository public interface WomenCareRepository extends JpaRepository<WomenCareEntity, Integer> { @Query(value="select lakh_5 from women_1A_premium where :age >=min_age and :age <=max_age and year=1",nativeQuery=true) int findPremium(int age); "message": "JDBC exception executing SQL…

VIEW QUESTION

Boot springboot app even if mongodb is down

I am using SpringBoot v2.7.0 I have following springboot config spring: data: mongodb: uri: ${MONGO_DB_URL} database: ${MONGO_DB_DATABASE} There is not explicit beans configurations. I have repositories for respective documents which extends MongoRepository<ModelNameClass, IDType> This is all working fine. But now…

VIEW QUESTION
Back To Top
Search