项目名称:
KOCA版本 :3.6.0
KOCA模块 :koca-jobschedule
模块版本 :3.6.1
场景 :在添加计划任务时报错,获取AuthContextHolderStrategy的Bean,失败,怀疑是未正常装载。
当前已添加依赖项如下:
问题 :
1.看如何正确加载权限相关模块
报错细节 :
com.szkingdom.koca.auth.context.AuthContextHolder 40: AuthContextHolder getPrincipal no AuthContextHolderStrategy found so return null
org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘com.szkingdom.koca.auth.context.AuthContextHolderStrategy’ available
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:351)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:342)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1172)
at com.szkingdom.koca.auth.util.ApplicationContextUtils.getBeanByClass(ApplicationContextUtils.java:31)
at com.szkingdom.koca.auth.context.AuthContextHolder.getPrincipal(AuthContextHolder.java:38)
at com.szkingdom.koca.admin.jobschedule.service.impl.JobServiceImpl.setCreator(JobServiceImpl.java:442)
at com.szkingdom.koca.admin.jobschedule.service.impl.JobServiceImpl.add(JobServiceImpl.java:143)
at com.szkingdom.koca.admin.jobschedule.service.impl.JobServiceImpl$$FastClassBySpringCGLIB$$993c837f.invoke()
尝试解决方案:
1.参考论坛的回复,做了一些尝试,加入自动加载依赖项,但是下载失败