• Post Reply Bookmark Topic Watch Topic
  • New Topic

Spring Data JPA CrudRepository

 
Joydeep Bhattacharjee
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello I am having some problem while running this . I am getting the following exception . I am trying out the following example CrudRepository for Spring Data, and I face the following


Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'helloCntrl': Unsatisfied dependency expressed through field 'test'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.joydeep.springboot.Test1' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations:{@org.springframework.beans.factory.annotation.Autowired(required=true)}


  



     


    



 
Sibendu Dey
Greenhorn
Posts: 22
Java Oracle Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Configure a class with @Repository to enable scanning of Repository classes.

@Repository(basePackages = { "Provide the package name to scan for repositories "})
public class RepositoryScanning{

}

Add the RepositoryScanning class to the RootApplicationContext
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!