When the bean is createt for a class as MyBean
the bean id is myBean
but what will be the bean ID if I create the service bean from an interface like below?
@Service
public class ProfileServiceImpl implements ProfileService
When I try to access the bean as @profileService
thymeleaf gives the below error.
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'profileService' is defined
All this time I'm using this bean by autowiring
to the controller. But at the moment I need to access this from the thymeleaf
.
Aucun commentaire:
Enregistrer un commentaire