Showing
1 changed file
with
2 additions
and
5 deletions
... | ... | @@ -22,10 +22,7 @@ import org.eclipse.leshan.core.model.ResourceModel; |
22 | 22 | import org.eclipse.leshan.core.node.LwM2mPath; |
23 | 23 | import org.eclipse.leshan.server.registration.Registration; |
24 | 24 | import org.springframework.beans.factory.annotation.Autowired; |
25 | -import org.springframework.boot.context.event.ApplicationReadyEvent; | |
26 | 25 | import org.springframework.context.annotation.Lazy; |
27 | -import org.springframework.context.event.EventListener; | |
28 | -import org.springframework.core.annotation.Order; | |
29 | 26 | import org.springframework.stereotype.Service; |
30 | 27 | import org.thingsboard.server.common.data.DeviceProfile; |
31 | 28 | import org.thingsboard.server.common.data.device.data.PowerMode; |
... | ... | @@ -36,6 +33,7 @@ import org.thingsboard.server.common.transport.TransportDeviceProfileCache; |
36 | 33 | import org.thingsboard.server.common.transport.TransportServiceCallback; |
37 | 34 | import org.thingsboard.server.common.transport.auth.ValidateDeviceCredentialsResponse; |
38 | 35 | import org.thingsboard.server.gen.transport.TransportProtos; |
36 | +import org.thingsboard.server.queue.util.AfterStartUp; | |
39 | 37 | import org.thingsboard.server.queue.util.TbLwM2mTransportComponent; |
40 | 38 | import org.thingsboard.server.transport.lwm2m.config.LwM2MTransportServerConfig; |
41 | 39 | import org.thingsboard.server.transport.lwm2m.config.LwM2mVersion; |
... | ... | @@ -90,8 +88,7 @@ public class LwM2mClientContextImpl implements LwM2mClientContext { |
90 | 88 | private final Map<String, LwM2mClient> lwM2mClientsByRegistrationId = new ConcurrentHashMap<>(); |
91 | 89 | private final Map<UUID, Lwm2mDeviceProfileTransportConfiguration> profiles = new ConcurrentHashMap<>(); |
92 | 90 | |
93 | - @EventListener(ApplicationReadyEvent.class) | |
94 | - @Order(Integer.MAX_VALUE - 1) | |
91 | + @AfterStartUp(order = Integer.MAX_VALUE - 1) | |
95 | 92 | public void init() { |
96 | 93 | String nodeId = context.getNodeId(); |
97 | 94 | Set<LwM2mClient> fetchedClients = clientStore.getAll(); | ... | ... |