首页 > 其他分享 >target method '%s' found on bean target class '%s', but not found in any interf

target method '%s' found on bean target class '%s', but not found in any interf

时间:2023-05-12 16:04:55浏览次数:37  
标签:target bean proxy interface found method

target method '%s' found on bean target class '%s', 
but not found in any interface(s) for bean JDK proxy. 
Either pull the method up to an interface or switch to 
subclass (CGLIB) proxies by setting proxy-target-class/proxyTargetClass
attribute to 'true'

出现场景:

目前我发现@KafkaListener或@Scheduled修饰方法时,如果该类继承了接口类,但接口类里没有写这个方法,就会报错。

解决方法:

在对应的接口类里加上这个方法。

标签:target,bean,proxy,interface,found,method
From: https://www.cnblogs.com/yiyuzi/p/17394410.html

相关文章

  • org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
    记录一次踩坑看了很多网上的方法绝大多数是让你检查xml文件名或者是编译文件层级之类的都不对参考这里org.apache.ibatis.binding.BindingException:Invalidboundstatement(notfound)一般的原因是Mapperinterface和xml文件的定义对应不上,需要检查包名,namespace,函数......
  • spring出现依赖关系形成循环问题,The dependencies of some of the beans in the appli
    出现这个问题大多使用的springboot都是在2.6.x以上,springboot在2.6.x就将依赖循环禁用了,解决方式有以下几种:解决方式:1、第一种解决方式:可以优化自己程序的逻辑,优化bean的依赖关系,只要不形成一个环状就不会出该问题了 2、第二种解决方式:可以使用@Lazy注解(懒加载)和@Autowired注......
  • Issues with peer dependencies found
    我想把Vue2项目升级到Vue3,老项目用的是Vue-Cli,打包工具是webpack,新的工具是Vite,在老项目下修改packages.json文件导致依赖包冲突。解决步骤:删除node_modules;重新安装依赖包。重新安装,一切正常:......
  • No matching constructor found in class 'hello问题的解决
    问题描述在Spring的bean配置里面引入java类的相关路径,但是显示上面这个错误问题解决查找资料发现,这个问题的原因就是我引用的这个实体类里面没有无参构造函数的定义,定义之后,就能够正常使用啦!......
  • nginx 10061: No connection could be made because the target machine actively ref
    nginx10061:Noconnectioncouldbemadebecausethetargetmachineactivelyrefusedit nginx重载配置一直有些不生效,查看后,发现nginx有4个,全部关闭掉,再重开nginx,正常了nginx.exe-squit,可以把正常的nginx退出掉,其他的nginx,任务管理器强制关闭掉startnginx开启nginx,o......
  • 数据库连接池报错java.lang.NoClassDefFoundError
    第一次用c3p0,在连接时,发声如下报错java.lang.NoClassDefFoundError 经查看,发现它需要辅助包 mchange-commons-java.jar,下载放入后,即可 ......
  • CUDA已经安装但nvcc -V显示command not found(Ubuntu20.04LTS系统)
    背景介绍安装了NVIDIA驱动程序,同时也安装了CUDA,但使用nvcc-V命令提示不存在,如下所示:1Command'nvcc'notfound,butcanbeinstalledwith:2sudoaptinstallnvidia-cuda-toolkit知识补充:为什么要使用nvcc命令?使用nvcc-V命令可以查看CUDA的版本,如下所示为正常的输入......
  • linux npm 全局安装 command not found
    前言在linux使用npm全局安装一个模块时,会提示命令找不到。例如:npminstall@quasar/cli-g后$quasar-vquasar:commandnotfound原因是npm的环境变量没有添加设置,导致无法正常使用该命令。解决方法将npm加入环境变量中,打印npm安装位置npmprefix-glinux......
  • mac下 nvm 安装 node 版本报错 python: not found
    mac下nvminstallv12.22.12时,始终限制安装失败,解决方案,做好以下两件事:将镜像源更换位淘宝镜像源将终端app右键显示简介,勾选rosetta重启终端即可参考 https://blog.csdn.net/xinshou_caizhu/article/details/128889858https://www.jianshu.com/p/2b47107e188a?utm......
  • 解决CentOS 7出现docker-compose: command not found
    解决CentOS7出现docker-compose:commandnotfound1.安装docker-compose既然使用了docker-compose那自然得安装了在GitHub上拉取过慢,建议在国内源DaoCloud中拉取:curl-Lhttps://get.daocloud.io/docker/compose/releases/download/1.29.2/docker-compose-`uname-s`-`unam......