I have been working on a mongodb repository with Spring-framework using spring-data-mongodb. I recently updated the version to 2.2.6.RELEASE and it stopped working. The issue occurred as SPEL is not able to evaluate anything on the @ Document annotation: @ Document(collection = "#{ getEnvironment().getProperty('XXX') }") By digging the code I realised that when calling BasicMongoPersistentEntity.getCollection() will always generate a StandardEvaluationContext with TypedValue rootObject with null values.

Before version 2.2.0 this has been working properly.

I hope this helps.

Comment From: sbrannen

This issue tracker is for the core Spring Framework.

I am therefore closing this issue.

Please open a new issue in the Spring Data MongoDB issue tracker.