Menu

Consider defining a bean of type in your configuration

A compile-time error thrown by Spring application as following "Consider defining a bean of type 'org.sling.service.ServiceClass' in your configuration". This means we have created a class or interface and trying to use it as a service or bean, but your class or interface doesn't have the feature of bean. 
So, to fix this with a service class use annotation @Service [org.springframework.stereotype.Service] on top of your class declaration will fix this error.

No comments:

Post a Comment