The injection point has the following annotations: - @org.springframework.beans.factory.annotation.Autowired(required=true)

***************************
APPLICATION FAILED TO START
***************************

Description:

Field EmployeeRepository in com.mob.service.EmployeeServiceImpl required a bean of type 'com.bhge.xsight.core.repository.WellDetailRepository' that could not be found.

The injection point has the following annotations:
 - @org.springframework.beans.factory.annotation.Autowired(required=true)


Action:

Consider defining a bean of type 'com.mob.core.repository.EmployeeRepository' in your configuration.

Encountered the following issue when i tried to use a Repository for another project core into my main empWeb project.

This issue was resolved by adding 

You can use @ComponentScan annotation in your main application empWeb  in order to register in Spring context classes which live in core project as Beans (Controllers, Services etc).

@ComponentScan({"com.example.service", "com.example.controlle‌​r"})


Also, make sure that Service implementations are annotated with @Service in core project.

No comments:

 Python Basics How to check the version of Python interpreter mac terminal

Popular in last 30 days