Field shiroService in com.bbzd.mes.shiro.auth.AuthRealm required a bean of type ‘xxxService‘ that...

created at 12-16-2021 views: 4

Problem Description

Writing the service layer today throws the following error:

Description:
Field shiroService in com.bbzd.mes.shiro.auth.AuthRealm required a bean of type 'com.bbzd.mes.shiro.service.ShiroService' 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.bbzd.mes.shiro.service.ShiroService' in your configuration.

reason

The service class forgets the @Service decorator 

solution

Add @Service decorator to service class

@Service
public class ShiroServiceImpl implements ShiroService {
}
created at:12-16-2021
edited at: 12-16-2021: