Merge pull request #12725 from YevhenBondarenko/fix/coap-config

Fix CoAP enabled properties
This commit is contained in:
Viacheslav Klimov 2025-02-25 11:45:31 +02:00 committed by GitHub
commit ff2ccefa66
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 8 additions and 7 deletions

View File

@ -1279,6 +1279,7 @@ transport:
# CoAP server parameters # CoAP server parameters
coap: coap:
server:
# Enable/disable coap server. # Enable/disable coap server.
enabled: "${COAP_SERVER_ENABLED:true}" enabled: "${COAP_SERVER_ENABLED:true}"
# CoAP bind address # CoAP bind address

View File

@ -45,7 +45,7 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNotNull;
@TestPropertySource(properties = { @TestPropertySource(properties = {
"coap.enabled=true", "coap.server.enabled=true",
"service.integrations.supported=ALL", "service.integrations.supported=ALL",
"transport.coap.enabled=true", "transport.coap.enabled=true",
}) })

View File

@ -61,7 +61,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
@Slf4j @Slf4j
@TestPropertySource(properties = { @TestPropertySource(properties = {
"coap.enabled=true", "coap.server.enabled=true",
"coap.dtls.enabled=true", "coap.dtls.enabled=true",
"coap.dtls.credentials.pem.cert_file=coap/credentials/server/cert.pem", "coap.dtls.credentials.pem.cert_file=coap/credentials/server/cert.pem",
"device.connectivity.coaps.enabled=true", "device.connectivity.coaps.enabled=true",

View File

@ -19,7 +19,7 @@ transport.mqtt.enabled=false
transport.coap.enabled=false transport.coap.enabled=false
transport.lwm2m.enabled=false transport.lwm2m.enabled=false
transport.snmp.enabled=false transport.snmp.enabled=false
coap.enabled=false coap.server.enabled=false
integrations.rpc.enabled=false integrations.rpc.enabled=false
service.integrations.supported=NONE service.integrations.supported=NONE

View File

@ -21,6 +21,6 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy; import java.lang.annotation.RetentionPolicy;
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
@ConditionalOnExpression("'${service.type:null}'=='tb-transport' || ('${service.type:null}'=='monolith' && '${transport.api_enabled:true}'=='true' && '${coap.enabled}'=='true')") @ConditionalOnExpression("'${service.type:null}'=='tb-transport' || ('${service.type:null}'=='monolith' && '${transport.api_enabled:true}'=='true' && '${coap.server.enabled}'=='true')")
public @interface TbCoapServerComponent { public @interface TbCoapServerComponent {
} }

View File

@ -22,6 +22,6 @@ import java.lang.annotation.RetentionPolicy;
@Retention(RetentionPolicy.RUNTIME) @Retention(RetentionPolicy.RUNTIME)
@ConditionalOnExpression("'${service.type:null}'=='tb-transport' || " + @ConditionalOnExpression("'${service.type:null}'=='tb-transport' || " +
"('${service.type:null}'=='monolith' && '${transport.api_enabled:true}'=='true' && '${coap.enabled}'=='true' && '${transport.coap.enabled}'=='true')") "('${service.type:null}'=='monolith' && '${transport.api_enabled:true}'=='true' && '${coap.server.enabled}'=='true' && '${transport.coap.enabled}'=='true')")
public @interface TbCoapTransportComponent { public @interface TbCoapTransportComponent {
} }