title: Spring Boot - How to create manually a bean and pass it to a hash map
body: <p>Want put a class in a HashMap. For that I have created a Bean with @Service. This is it:</p>
  
  <pre><code>@Service
  public class ServiceManagerImpl implements ServiceManager {
  
  @Override
   public void registerService() {
      // registerService will put this in the HashMap!
      dispatcher.registerService("serviceList", getServiceListImpl());
   }
  
   @Bean
   public BusinessService getServiceListImpl() {
      return new ServiceListManager();
   }
  }
  </code></pre>
  
  <p>Is this the right way to make something like this? </p>