title: How to use SpEL to inject result of method call in Spring?
body: <p>I want to inject result of method call to my class. I have next code:</p>
  
  <pre><code>class Example {
      private static final String NAME = "name";
  
      // #1
      @Autowired
      @Qualifier("a.b")
      private B b;    
  
      // #2
      @Autowired
      @Qualifier("#{a.b}")
      private B b;
  
      // #3
      @Autowired
      @Qualifier("#{a.b.getC('" + NAME + "')}")
      private C c;
  }
  </code></pre>
  
  <p>So I have 3 different variants. First one is working, second one is not working but not sure whether I wrote SpEL correctly and third one is not working too.</p>
  
  <p>Actually what I need is third variant. I need to inject result of calling method "getC(name)" on bean called "a.b"</p>
  
  <p>Maybe somebody had similar problem and know how to do it?</p>