网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

springboot初始化报错Failedtoinstantiate[XXX]:Specifiedclassisaninterface怎么办

本篇文章为大家展示了springboot初始化报错Failed to instantiate [XXX]: Specified class is an interface怎么办,内容简明扼要并且容易理解,绝对能使你眼前一亮,通过这篇文章的详细介绍希望你能有所收获。

承德ssl适用于网站、小程序/APP、API接口等需要进行数据传输应用场景,ssl证书未来市场广阔!成为成都创新互联的ssl证书销售渠道,可以享受市场价格4-6折优惠!如果有意向欢迎电话联系或者加微信:18982081108(备注:SSL证书合作)期待与您的合作!

org.springframework.beans.BeanInstantiationException: Failed to instantiate [XXX]: Specified class is an interface


今天在工作中出现如下报错,开始还以为由于粗心缺少注解(博主项目为springboot+mybatis架构,全部用注解配置)

部分报错如下

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [cn.com.depeng.yan.product.dao.PrpdProductDao]: Specified class is an interface
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:68) ~[spring-beans-4.3.17.RELEASE.jar:4.3.17.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1155) ~[spring-beans-4.3.17.RELEASE.jar:4.3.17.RELEASE]
	... 43 common frames omitted

结果并不是,后来发现居然是在别的包中有同名的sysUserDao类,重命名后果然好使。但是控制台报错也太误导别人了吧

上述内容就是springboot初始化报错Failed to instantiate [XXX]: Specified class is an interface怎么办,你们学到知识或技能了吗?如果还想学到更多技能或者丰富自己的知识储备,欢迎关注创新互联行业资讯频道。


分享标题:springboot初始化报错Failedtoinstantiate[XXX]:Specifiedclassisaninterface怎么办
当前链接:http://bjjierui.cn/article/goceei.html

其他资讯