Parameter 0 of constructor in XXXrequired a single bean, but 2 were found:

@ Parameter 0 of constructor in XXXrequired a single bean, but 2 were found: 记录一下踩了一周的坑 其实很简单 网上有各种版本的解决方案 比如加@primary等等 但是这些不是最根本的解决方案,之所以出现这个错误的原因是创建bean对象的时候包扫描把这些接口都给扫描进去了,所以才会报错。 我是用的springboot+m
相关文章
相关标签/搜索