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