title: How to get bean using application context in spring boot
body: <p>I am developing a SpringBoot project and I want to get the bean by its name using <code>applicationContext</code>. I have tried many solution from web but could not succeed. My Requirement is that I have a controller </p>
  
  <pre><code>ControllerA
  </code></pre>
  
  <p>and inside the controller I have a method <code>getBean(String className)</code>. I want to get instance of registered bean. I have hibernate entities and I want to get an instance of the bean by passing the name of class only in <code>getBean</code> method.</p>
  
  <p>Please help if someone know the solution.</p>