From eca3180c55bcfa6761e3d30fc43f950b841b11c4 Mon Sep 17 00:00:00 2001 From: CaptainB Date: Mon, 25 Oct 2021 11:22:30 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E5=8F=91=E9=80=81=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E6=9F=A5=E8=AF=A2=E5=85=B3=E6=B3=A8=E4=BA=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../metersphere/notice/sender/AbstractNoticeSender.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/backend/src/main/java/io/metersphere/notice/sender/AbstractNoticeSender.java b/backend/src/main/java/io/metersphere/notice/sender/AbstractNoticeSender.java index 5df9b25533..472702b181 100644 --- a/backend/src/main/java/io/metersphere/notice/sender/AbstractNoticeSender.java +++ b/backend/src/main/java/io/metersphere/notice/sender/AbstractNoticeSender.java @@ -24,6 +24,7 @@ import org.apache.commons.io.IOUtils; import org.apache.commons.lang3.RegExUtils; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.time.DateFormatUtils; +import org.springframework.context.annotation.Lazy; import javax.annotation.Resource; import java.io.IOException; @@ -38,18 +39,25 @@ public abstract class AbstractNoticeSender implements NoticeSender { @Resource private UserService userService; @Resource + @Lazy private PerformanceTestService performanceTestService; @Resource + @Lazy private ApiAutomationService apiAutomationService; @Resource + @Lazy private ApiDefinitionService apiDefinitionService; @Resource + @Lazy private ApiTestCaseService apiTestCaseService; @Resource + @Lazy private TestCaseService testCaseService; @Resource + @Lazy private TestPlanService testPlanService; @Resource + @Lazy private TestCaseReviewService testCaseReviewService; protected String getContext(MessageDetail messageDetail, NoticeModel noticeModel) {