Browse Source

TbEntityViewService bean lifecycle after removing TbCoreComponent annotation

pull/6785/head
Sergey Matvienko 4 years ago
parent
commit
380e994951
  1. 3
      application/src/main/java/org/thingsboard/server/actors/ActorSystemContext.java
  2. 16
      application/src/main/java/org/thingsboard/server/service/entitiy/AbstractTbEntityService.java
  3. 4
      application/src/main/java/org/thingsboard/server/service/entitiy/entityView/DefaultTbEntityViewService.java

3
application/src/main/java/org/thingsboard/server/actors/ActorSystemContext.java

@ -221,7 +221,8 @@ public class ActorSystemContext {
@Getter
private EntityViewService entityViewService;
@Autowired
@Lazy
@Autowired(required = false)
@Getter
private TbEntityViewService tbEntityViewService;

16
application/src/main/java/org/thingsboard/server/service/entitiy/AbstractTbEntityService.java

@ -21,6 +21,7 @@ import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Lazy;
import org.thingsboard.server.cluster.TbClusterService;
import org.thingsboard.server.common.data.EntityType;
import org.thingsboard.server.common.data.HasName;
@ -93,13 +94,13 @@ public abstract class AbstractTbEntityService {
@Autowired
protected DbCallbackExecutorService dbExecutor;
@Autowired
@Autowired(required = false)
protected TbNotificationEntityService notificationEntityService;
@Autowired(required = false)
protected EdgeService edgeService;
@Autowired
protected AlarmService alarmService;
@Autowired
@Autowired(required = false)
protected EntityActionService entityActionService;
@Autowired
protected DeviceService deviceService;
@ -111,24 +112,27 @@ public abstract class AbstractTbEntityService {
protected TenantService tenantService;
@Autowired
protected CustomerService customerService;
@Autowired
@Lazy
@Autowired(required = false)
protected ClaimDevicesService claimDevicesService;
@Autowired
protected TbTenantProfileCache tenantProfileCache;
@Autowired
protected RuleChainService ruleChainService;
@Autowired
@Autowired(required = false)
protected TbRuleChainService tbRuleChainService;
@Autowired
@Autowired(required = false)
protected EdgeNotificationService edgeNotificationService;
@Autowired
protected QueueService queueService;
@Autowired
protected DashboardService dashboardService;
@Autowired
protected EntitiesVersionControlService vcService;
@Autowired
protected EntityViewService entityViewService;
@Lazy
@Autowired
protected TelemetrySubscriptionService tsSubService;
@Autowired
@ -149,7 +153,7 @@ public abstract class AbstractTbEntityService {
protected InstallScripts installScripts;
@Autowired
protected UserService userService;
@Autowired
@Autowired(required = false)
protected TbResourceService resourceService;
@Autowired
protected WidgetsBundleService widgetsBundleService;

4
application/src/main/java/org/thingsboard/server/service/entitiy/entityView/DefaultTbEntityViewService.java

@ -44,8 +44,6 @@ import org.thingsboard.server.common.data.kv.TsKvEntry;
import org.thingsboard.server.common.data.plugin.ComponentLifecycleEvent;
import org.thingsboard.server.common.msg.plugin.ComponentLifecycleMsg;
import org.thingsboard.server.dao.timeseries.TimeseriesService;
import org.thingsboard.server.queue.util.TbCoreComponent;
import org.thingsboard.server.queue.util.TbRuleEngineComponent;
import org.thingsboard.server.service.entitiy.AbstractTbEntityService;
import org.thingsboard.server.service.security.model.SecurityUser;
@ -62,8 +60,6 @@ import java.util.stream.Collectors;
import static org.apache.commons.lang3.StringUtils.isBlank;
@Service
@TbCoreComponent
@TbRuleEngineComponent
@AllArgsConstructor
@Slf4j
public class DefaultTbEntityViewService extends AbstractTbEntityService implements TbEntityViewService {

Loading…
Cancel
Save