Browse Source

Fix the microservices mode for CoAP

pull/4963/head
Andrii Shvaika 5 years ago
parent
commit
856b0259d1
  1. 3
      common/transport/coap/src/main/java/org/thingsboard/server/transport/coap/client/DefaultCoapClientContext.java

3
common/transport/coap/src/main/java/org/thingsboard/server/transport/coap/client/DefaultCoapClientContext.java

@ -22,6 +22,7 @@ import org.eclipse.californium.core.coap.MediaTypeRegistry;
import org.eclipse.californium.core.coap.Response;
import org.eclipse.californium.core.observe.ObserveRelation;
import org.eclipse.californium.core.server.resources.CoapExchange;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.stereotype.Service;
import org.thingsboard.server.coapserver.CoapServerContext;
import org.thingsboard.server.coapserver.TbCoapServerComponent;
@ -73,7 +74,7 @@ import static org.eclipse.californium.core.coap.Message.NONE;
@Slf4j
@Service
@RequiredArgsConstructor
@TbCoapServerComponent
@ConditionalOnExpression("'${service.type:null}'=='tb-transport' || ('${service.type:null}'=='monolith' && '${transport.api_enabled:true}'=='true' && '${transport.coap.enabled}'=='true')")
public class DefaultCoapClientContext implements CoapClientContext {
private final CoapServerContext config;

Loading…
Cancel
Save