Parameter 9 of constructor in com.xxx.impl.xxxServiceImpl required a bean of type 'int' that could not be found.

1查看Service实现类是否加了@AllArgsConstructor
2删除@AllArgsConstructor

3给每个要注入的serviceBean加@Resource

原因
lombok的@AllArgsConstructor注解会代替@Autowired注入,导致某些不需要手动注入的bean重复加了
@Autowired
posted @ 2023-05-15 11:57  java从精通到入门  阅读(784)  评论(0编辑  收藏  举报