I'm running my image that builds on the spring boot project using docker. I specify the environment variables by --env-file
.
I have configured in my project with application.yml
file. The configuration related to the BindingServiceProperties class :
spring:
cloud:
stream:
rabbit:
default:
consumer:
recovery-interval: 3000
bindings:
input:
consumer:
max-attempts: 3
default-retryable: false
retryable-exceptions:
com.example.messaging.exception.RecoverableMessagingException: true
com.example.messaging.exception.NonRecoverableMessagingException: false
binders:
rabbit_server:
type: rabbit
environment:
spring:
rabbitmq:
host: localhost
port: 5672
username: guest
password: guest
virtual-host: /
...<and more>
In the .env file where i will pass the environment variables, i have configured with the simple variable flow by Spring Boot Relaxed Binding 2.0. the simple configuration like:
SPRING_CLOUD_STREAM_RABBIT_DEFAULT_CONSUMER_RECOVERYINTERVAL=3000
But for the bindings
and binders
, it is Map<String, Object>
.
How can i config the value of map data in the env Docker file?