Fix the microservices mode for CoAP

This commit is contained in:
Andrii Shvaika 2021-07-22 16:18:39 +03:00
parent 4ce9e0968d
commit 856b0259d1

View File

@ -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;