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,8 +1279,9 @@ transport:
# CoAP server parameters
coap:
# Enable/disable coap server.
enabled: "${COAP_SERVER_ENABLED:true}"
server:
# Enable/disable coap server.
enabled: "${COAP_SERVER_ENABLED:true}"
# CoAP bind address
bind_address: "${COAP_BIND_ADDRESS:0.0.0.0}"
# CoAP bind port

View File

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

View File

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

View File

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

View File

@ -21,6 +21,6 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@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 {
}

View File

@ -22,6 +22,6 @@ import java.lang.annotation.RetentionPolicy;
@Retention(RetentionPolicy.RUNTIME)
@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 {
}