1

I upgraded the application from spring boot 2.0.5 to spring 2.4.0. However, I received java.lang.IllegalArgumentException: The connection string is invalid. Connection strings must start with either 'mongodb://' or 'mongodb+srv://

The mongodbstatestore-autoconfigure was upgraded from 4.0.22 to 4.0.29. It seems that resources(applications.yml) does not work efficiently, that is, spring.data.mongo.uri cannot be called from @Value("#{ '${spring.data.mongodb.uri:${STATE_CONNECTIONSTRING:null}}' }".

Does anyone know how to solve this problem?

0 Answers0