我刚开始学习Spring。我在我的应用程序中使用内置的Spring转换器。但是在服务层,当创建构造函数时,它没有看到转换器bean。
如何将转换bean传输到Spring
我的错误代码:
'org.springframework.core.convert.converter.Converter‘中构造函数的
参数1需要一个无法找到的类型的bean。
操作:
考虑在配置中定义'org.springframework.core.convert.converter.Converter‘类型的bean。

发布于 2022-10-31 23:36:54
您必须将类Converter定义为bean,并将ClientService注释更改为@Service。
Converter.java
@Component
public class Converter<M, D>ClientService.java
@Service
public class ClientServicehttps://stackoverflow.com/questions/74268624
复制相似问题