title: In MongoDb @CreatedBy getting null with springBoot
body: <p>I am using spring annotations <code>@CreatedBy</code> for createdBy and <code>@LastModifiedBy</code> for updatedBy-</p>
  
  <pre><code>@CreatedBy
  @Field(value = "createdBy")
  private String createdBy;
  
  @LastModifiedBy
  @Field(value = "updatedBy")
  private String updatedBy; 
  </code></pre>
  
  <p>Also i have used <code>@EnableMongoAuditing</code> this annotation in the main application.</p>
  
  <p>And created a class which implements <code>AuditorAware</code> like below-</p>
  
  <pre><code>@Component
  public class UserAudtiting implements AuditorAware&lt;String&gt; {
  
      @Override
      public Optional&lt;String&gt; getCurrentAuditor() {
  
          String uname = SecurityContextHolder.getContext().getAuthentication().getName();
          return Optional.of(uname);
      }
  }
  </code></pre>
  
  <p>So when i am using some post method to save data , I am getting <strong>"createdBy":null</strong> in response.</p>
  
  <p>What should i do for this? Please help!</p>