Merge pull request #12725 from YevhenBondarenko/fix/coap-config
Fix CoAP enabled properties
This commit is contained in:
commit
ff2ccefa66
@ -1279,8 +1279,9 @@ transport:
|
|||||||
|
|
||||||
# CoAP server parameters
|
# CoAP server parameters
|
||||||
coap:
|
coap:
|
||||||
# Enable/disable coap server.
|
server:
|
||||||
enabled: "${COAP_SERVER_ENABLED:true}"
|
# Enable/disable coap server.
|
||||||
|
enabled: "${COAP_SERVER_ENABLED:true}"
|
||||||
# CoAP bind address
|
# CoAP bind address
|
||||||
bind_address: "${COAP_BIND_ADDRESS:0.0.0.0}"
|
bind_address: "${COAP_BIND_ADDRESS:0.0.0.0}"
|
||||||
# CoAP bind port
|
# CoAP bind port
|
||||||
|
|||||||
@ -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",
|
||||||
})
|
})
|
||||||
|
|||||||
@ -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",
|
||||||
|
|||||||
@ -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
|
||||||
|
|
||||||
|
|||||||
@ -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 {
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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 {
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user