refactor(core): 添加 Lazy 注解解决循环依赖问题

- 在多个 Service 类中为注入的依赖添加 @Lazy 注解
- 修改了微信支付服务实现类中的依赖注入方式
- 更新了打印机服务实现类中的依赖注入配置
- 调整了统计拦截器和服务类中的依赖注入策略
- 优化了 FaceService 和相关 Repository 的注入方式
- 防止应用启动时因循环依赖导致的初始化失败
This commit is contained in:
2025-12-05 15:21:01 +08:00
parent 82626f615b
commit 71a8d3b539
5 changed files with 21 additions and 15 deletions

View File

@@ -6,6 +6,7 @@ import com.ycwl.basic.stats.service.StatsService;
import com.ycwl.basic.stats.util.StatsUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.HandlerInterceptor;
@@ -18,6 +19,7 @@ import java.util.HashSet;
@Component
public class StatsInterceptor implements HandlerInterceptor {
@Lazy
@Autowired
private StatsService statsService;