Managed to resolve it by removing the env in application properties and having:
spring.application.name=movies spring.data.mongodb.database=${MONGO_DATABASE} spring.data.mongodb.uri=mongodb+srv://${MONGO_USER}:${MONGO_PASSWORD}@${MONGO_CLUSTER}