提交 baf3233b 作者: 沈振路

添加懒加载

上级 c4b72ec8
...@@ -31,6 +31,7 @@ import org.slf4j.LoggerFactory; ...@@ -31,6 +31,7 @@ import org.slf4j.LoggerFactory;
import org.springframework.amqp.rabbit.annotation.RabbitListener; import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.amqp.rabbit.core.RabbitTemplate; import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -79,6 +80,7 @@ public class CustomerServiceCommonAsyncComponent { ...@@ -79,6 +80,7 @@ public class CustomerServiceCommonAsyncComponent {
private RabbitTemplate rabbitTemplate; private RabbitTemplate rabbitTemplate;
@Resource @Resource
private CompanyAcquisitionLinkService companyAcquisitionLinkService; private CompanyAcquisitionLinkService companyAcquisitionLinkService;
@Lazy
@Autowired @Autowired
private CrowdPackageService crowdPackageService; private CrowdPackageService crowdPackageService;
......
...@@ -34,6 +34,7 @@ import org.slf4j.Logger; ...@@ -34,6 +34,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -62,6 +63,7 @@ public class CrowdPackageServiceImpl extends ServiceImpl<MaterialCrowdPackageMap ...@@ -62,6 +63,7 @@ public class CrowdPackageServiceImpl extends ServiceImpl<MaterialCrowdPackageMap
private RegisterUserEntityMapper userEntityMapper; private RegisterUserEntityMapper userEntityMapper;
@Autowired @Autowired
private RedisTemplate redisTemplate; private RedisTemplate redisTemplate;
@Lazy
@Autowired @Autowired
private CustomerServiceCommonAsyncComponent asyncComponent; private CustomerServiceCommonAsyncComponent asyncComponent;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论