java shiro框架 jdk11 tomcat9 在启动的时候遇到多个ClassNotFoundException问题

java shiro框架 jdk11 tomcat9 在启动的时候遇到以下错误, 问题遇到的现象和发生背景

Caused by: java.lang.ClassNotFoundException: com.lk.security.phoneSecurityCodeLogin.CustomModularRealmAuthenticator

Related cause:
org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.lk.security.SysHashedCredentialsMatcher] for bean with name 'hashedCredentialsMatcher' defined in URL [file:/Users/kangliu/Desktop/work/workspace-new/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/datagraph/WEB-INF/classes/securityConfig.xml]; nested exception is java.lang.ClassNotFoundException: com.lk.security.SysHashedCredentialsMatcher
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1357)

6月 19, 2022 9:12:55 下午 org.apache.catalina.core.StandardContext startInternal
严重: 一个或多个listeners启动失败,更多详细信息查看对应的容器日志文件
6月 19, 2022 9:12:55 下午 org.apache.catalina.core.StandardContext startInternal
严重: 由于之前的错误,Context[]启动失败
6月 19, 2022 9:12:55 下午 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
6月 19, 2022 9:12:55 下午 org.apache.coyote.AbstractProtocol start
信息: 开始协议处理句柄["http-nio-8080"]
6月 19, 2022 9:12:55 下午 org.apache.catalina.startup.Catalina start
信息: [6193]毫秒后服务器启动

以上是报的错
代码都没问题,肯定是环境问题,但是不知道是哪里的环境问题,代码都有。
这个security包下面的类都有,不知道为啥怎么老提示找不到类?
是因为用了shiro拦截器的问题吗?

干嘛用jdk11,spring不一定支持jdk11

在pom文件上右键,然后reimport,之后重新编译整个项目

都不是你们说的问题,我原来的项目jdk版本是1.8,现在讲jdk降到了1.8,然后再通过maven--》update project,然后再右键项目名称--〉properties-->deployment assembly-->add --> java build path entries--> next -->maven dependencies-->apply and close
大功告成!!!

严重怀疑依赖的jar有冲突,多版本造成的,检查一下!

重新编译,检查编译过程中是否出错

jar包没导入吗

jar包导入了吗

你要是不知道什么jar包,每次把相关的jar都添加进去

检查你的shiro包是否导入,拦截器不至于编译都不过

先看看pom的包是否完整,下全部下载完成。之后还要确定你的类里面注解是否使用正确