title: Evaluation context not correctly set for @Document in Spring 5.x / Spring boot 2.1.6
body: <p>I am writing a Spring boot application with latest Spring boot 2.1.6 release. There was an issue earlier, which has been discussed both on SO as well as Spring's bug tracker where the Spring EL context did not have access to beans.</p>
  
  <p>This was supposed to have been resolved in Spring 4.x releases. However, I am facing the same problem</p>
  
  <p>References:</p>
  
  <ol>
  <li><a href="https://stackoverflow.com/questions/18129291/mongodb-and-spel-expressions-in-document-annotations">SO thread 1</a></li>
  <li><a href="http://stackoverflow.com/questions/19807733/mongodb-multi-tenacy-spel-with-document">SO thread 2</a></li>
  <li><a href="https://jira.spring.io/browse/DATAMONGO-1043" rel="nofollow noreferrer">Spring Data Bug 1043</a></li>
  <li><a href="https://jira.spring.io/browse/DATAMONGO-525" rel="nofollow noreferrer">Spring Data Bug 525</a></li>
  <li><a href="https://jira.spring.io/browse/DATAMONGO-1874" rel="nofollow noreferrer">Spring Data Bug 1874</a></li>
  </ol>
  
  <p>I have tried most of the solutions that were suggested before the actual fix was put in as well.</p>
  
  <p>Right now my code has the annotation like this - </p>
  
  <pre><code>@Document("#{mongoCollectionNameResolver.getCollectionName('BANK')}")
  //@Document("BANK")
  public class Bank {
  }
  </code></pre>
  
  <p>I have verified that the bean is getting correctly created with the name mentioned in the expression.</p>
  
  <p>I just wanted to ask the community if I am supposed to do anything more for Spring 5.x that I am missing before I reopen the bug / open a new bug with Spring data mongo</p>