132-报错:Is there an unresolvable circular reference

时间:2022-11-20 10:59:05

报错信息:

Requested bean is currently in creation: Is there an unresolvable circular reference?


出现原因:
分别再过滤器和拦截器,同时注入同一个service.

AFilter.java

@Autowired
Aservice aservice;

BFilter.java:

@Autowired
Aservice aservice;

解决: 分别添加 @Lazy