title: System.getproperty("spring.profiles.active") always getting Null in JPA Entity Listeners
body: <p>I am trying to get Spring active profile in <code>JPA</code> Entity Listener using <code>System.getproperty("spring.profiles.active")</code>. But it is always returning Null profile. However I have checked on server and profile is correctly configured.</p>
  
  <p>I have tried to get Spring active profile using Environment but in the listener, I am unable to <code>@Autowired</code> Environment also. </p>
  
  <pre><code>    @PostUpdate
  
      public void methodInvoked afterUpdate(Example example){
  
      String activeProfile = System.getproperty("spring.profiles.active");  
  
      }
  </code></pre>
  
  <p>Any guidance please !</p>