Could not autowire.

    技术2023-07-19  67

    报错信息: Description:

    Parameter 0 of method securityManager in com.markerhub.config.ShiroConfig required a bean of type ‘com.markerhub.shiro.AccountRealm’ 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.markerhub.shiro.AccountRealm’ in your configuration.

    出现原因: 在引入对象的地方会报红Could not autowire. No beans of ‘RedisCacheManager’ type found 没有注入bean

    解决办法: 在相关类上加上@Component注解即可

    Processed: 0.011, SQL: 9