 <p>You might be missing</p> <pre><code>&lt;context:component-scan base-package="org.example"&gt; </code></pre> <p>in your applicationContext.xml file <strong>OR</strong></p> <pre><code>@ComponentScan("com.example") </code></pre> <p>annotation if you are doing code based configuration.</p>