Quantcast
Channel: Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled - Stack Overflow
Viewing all articles
Browse latest Browse all 13

Answer by Ratnesh K for Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled

$
0
0

I came across the same error

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.2021-12-21 22:57:45.237 ERROR 4952 --- [ main] o.s.boot.SpringApplication : Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRepository' defined in com.sts.dao.UserRepository defined in @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration: No property findbyName found for type User!

Because I defined wrong name for Custom Methods( or Derived methods) in My Repository while using Spring Data JPA, then I search Spring data Jpa reference where I found that there is strict naming convention for Custom methods which we need to follow otherwise it gives errors.

like findByName(), findInAge() , findByAgeLessThan()

In my case i was writing method like

**public List<User> findbyName(String name);**

which produced above error.

Suggestion: While working with spring data JPA follow camelCase and all naming convention defined in reference doc strictly to avoid errors.


Viewing all articles
Browse latest Browse all 13

Trending Articles