title: Spring @configurable NullPointerException
body: <p>I tried to use @configurable on my project to have @autowired service in object that are outside of spring context or something like that but didn't manage to make it work. The service is always null.</p>
  <p>(I compared 4 different tutorials but nothing worked)</p>
  <p>So, by despair I tried to download working examples directly to compare them but they didn't worked as well. (but I had to change them a bit, see in &quot;Notes&quot;)</p>
  <p>Here are the two examples I tried to download but gave me a nullPointerException too :<br />
  <a href="https://github.com/kenyattaclark/Spring-Configurable-Example" rel="nofollow noreferrer">https://github.com/kenyattaclark/Spring-Configurable-Example</a><br />
  <a href="https://www.baeldung.com/spring-inject-bean-into-unmanaged-objects" rel="nofollow noreferrer">https://www.baeldung.com/spring-inject-bean-into-unmanaged-objects</a> (the link is at the end of the page)</p>
  <p>So, are these examples working on your side? Did I miss something really important?</p>
  <p>Notes :<br />
  I'm using the correto version of java(but I suppose it's unlikely that the problem come from here)</p>
  <p>I had to make some changes in the two examples ot make them work so maybe that's why :<br />
  for the first one I added a <code>&lt;pluginManagement&gt;</code> in the pom because if I didn't, eclipse was giving me an error &quot;Plugin execution not covered by lifecycle configuration&quot; and if I tried to compile I had the error : &quot;error can't determine superclass of missing type java.lang.Object
  when batch building BuildConfig[null] #Files=3 AopXmls=#0
  [Xlint:cantFindType]&quot;<br />
  for the second one I didn't use <code>&lt;pluginManagement&gt;</code>. But I didn't download the parent folder so I changed that in the pom and also forced the java version to 11 or maven was resetting it to 1.5 and had to update the junit test to junit5.</p>
  <p>So there is room for me screwing all this up, but I'm tired of looking everywhere on internet and couldn't even get one working example.<br />
  So, if someone know what's wrong or how to make one example of @configurable work please tell me.</p>