I met a huge pit at work today bug, This is the log prompt .

Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'userService':

Injection of resource dependencies failed; nested exception is
org.springframework.beans.factory.BeanCreationException:

Error creating bean with name 'userBranchAccountService':

Injection of resource dependencies failed; nested exception is
org.springframework.beans.factory.NoSuchBeanDefinitionException:

No qualifying bean of type [sys.user.repository.UserRepository] found for
dependency: expected at least 1 bean which qualifies as autowire candidate for
this dependency. Dependency annotations:

{@javax.annotation.Resource(shareable=true, lookup=, name=, description=,
authenticationType=CONTAINER, type=class java.lang.Object, mappedName=)}

At that time, I really had all kinds of tsonima running in my heart , I wrote it clearly userService and UserRepository    
@Autowired It's also normal , I don't know why ,

It turns out that there are capital letters in my package name , It's not recognized , Write it here , I hope that in the future work, some of them are written according to the Convention or the conventional method

BeanCreationException The general situation is to check whether your configuration is correct ,@Service
@[email protected] Is that right , use Autowired The words of , There is also the possibility of repeated injection if other examples are used jpa Do you write the necessary configuration on the main class, such as @EnableJpaRepositories(repositoryBaseClass
= SimpleBaseRepository.class)

Then there is the problem of circular dependency , Report back BeanCreationException This error indicates that the container has been created successfully , There was an accident when something was thrown from the net container