title: Assign Spring bean to field not managed by Spring
body: <p>I have a configuration object that is managed by Spring. Let's call that object 'ConfigurationObject'. The configuration contained by that object I also want to make accessible, through delegation, in objects which I instantiate with the 'new' operator. Let's call these objects 'UserObject'. 
  Would it then be acceptable to pass the configurationObject as an argument to the constructor of the UserObject and then assign it to a regular private field that is not managed by Spring? So that I can then use the ConfigurationObject to return configuration form the UserObject. See below for the story in code.</p>
  
  <pre><code>@Configuration
  public class ConfigurationObject {
  
     private final String configItem;
  
     public ConfigurationObject(@Value("${config.item}") final String configItem){
          this.configItem = configItem;
     }
  
     public String getConfigItem() {
       return configItem;
    }
  }
  
  public final class UserObject {
  
      private ConfigurationObject configurationObject;
      /* other properties */
  
      public UserObject(final ConfigurationObject configurationObject) {
         this.configurationObject = configurationObject;
      }
  
      public String getConfigItem(){
        return configurationObject.getConfigItem();
      }
  }
  </code></pre>
  
  <p>Best regards,</p>
  
  <p>Henk</p>