title: Do variables initialized in the override ApplicationContextAware.setApplicationContext method need to be declared as volatile in Spring Framework?
body: <p>I initialize SpringUtils class Spring singleton bean applicationContext field by override ApplicationContextAware.setApplicationContext method:</p>
  <pre class="lang-java prettyprint-override"><code>@Component
  public class SpringUtils implements ApplicationContextAware {
  
      private ApplicationContext applicationContext;
  
      @Override
      public void setApplicationContext(ApplicationContext applicationContext) {
          this.applicationContext = applicationContext;
      }
  
      /**
       * get applicationContext
       *
       * @return ApplicationContext
       */
      public ApplicationContext getApplicationContext() {
          return applicationContext;
      }
  }
  </code></pre>
  <p>Should I worry about SpringUtils class Spring singleton bean applicationContext field visibility to other beans(other thread) and mark it volatile.</p>