title: How to use qualifier to decide the fields of a class?
body: <p>I have created to Hazelcast map config in one instance.
  I have a bean method inside config which sends separate maps in 2 different methods.
  Class CacheService has a field which will be injected by any one of those methods.</p>
  
  <p>I am trying to use Qualifier annotation to get instance of CacheService, but I need one CacheService instance to hold a variable from first type bean method return value and second instance to have the second bean return value.
  PS: I use lombok for auto constructor and injection
  How can I achieve this?</p>
  
  <p>I tried using Qualifiers in the @bean annotation method and create two seperate class for CacheService with qualifiers inside for fields, which didn't work.</p>
  
  <blockquote>
    <p>Config Class</p>
  </blockquote>
  
  <pre><code>@Bean
  public IMap&lt;String, Object&gt; mainCache(HazelcastInstance hazelcastInstance) {
  
          return hazelcastInstance.getMap(mainCache);
      }
  @Bean
  public IMap&lt;String, Object&gt; secCache(HazelcastInstance hazelcastInstance) {
          return hazelcastInstance.getMap(SecondaryCache);
      }
  </code></pre>
  
  <blockquote>
    <p>Class that uses bean method's value</p>
  </blockquote>
  
  <pre><code>@Service
  @RequiredArgsConstructor
  public class CacheService {
  
  //Value that needs to be dynamic based on the qualifier
      private final IMap&lt;String, Object&gt; cache;
  
      public void put(String key, Object value) {
          cache.put(key, value);
      }
  
      public Object get(String key) {
          return cache.get(key);
      }
  
      public &lt;T&gt; T get(String key, Class&lt;T&gt; type) {
          return type.cast(cache.get(key));
      }
  }
  </code></pre>
  
  <blockquote>
    <p>Class with a problem</p>
  </blockquote>
  
  <pre><code>@RequiredArgsConstructor
  @EnableAspectJAutoProxy
  public class CacheCalculationInterceptor {
          //I need this instance with CacheService's variable IMap as returned by mainCache method of config class
      private final CacheService mainCacheService;
          //I need this instance with CacheService's variable IMap as returned by secCache method of config class
      private final CacheService secCacheService;
  
  </code></pre>
  
  <p>As I mentioned in comment I need 2 instances of CacheService class that has fields with different values from 2 different bean method. 
  But I am getting "Parameter 0 of constructor in CacheService required a single bean, but 2 were found:"</p>