title: Unsatisfied Dependency Exception in Spring boot
body: <p>I have a properties XML file as following :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"&gt;
  &lt;properties&gt;
      &lt;entry key="sample.findAll"&gt;
          &lt;![CDATA[
              The SQL query goes here
          ]]&gt;
      &lt;/entry&gt;    
  &lt;/properties&gt;
  </code></pre>
  
  <p>And a config file as following :</p>
  
  <pre><code>@ImportResource("classpath:sql/find-all-sample-native-query.xml")
  @Configuration
  public class SampleFindAllConfig {
  
      @Value("#{sample.findAll}")
      private String findAllQuery;
  
      @Bean
      public String findAllSampleNativeQuery() {
          return findAllQuery;
      }
  }
  </code></pre>
  
  <p>I'm injecting the Bean in the DAO class as following :</p>
  
  <pre><code>@Inject
  private String findAllAnomalieNativeQuery;
  </code></pre>
  
  <p>But I get this error when I run my application :</p>
  
  <blockquote>
    <p>org.springframework.beans.factory.UnsatisfiedDependencyException:
    Error creating bean with name 'sampleDAO': Unsatisfied dependency
    expressed through field 'findAllSampleNativeQuery'; nested exception
    is org.springframework.beans.factory.UnsatisfiedDependencyException:
    Error creating bean with name 'sampleFindAllConfig': Unsatisfied
    dependency expressed through field 'findAllQuery'; nested exception is
    org.springframework.beans.factory.BeanExpressionException: Expression
    parsing failed; nested exception is
    org.springframework.expression.spel.SpelEvaluationException: EL1008E:
    Property or field 'sample' cannot be found on object of type
    'org.springframework.beans.factory.config.BeanExpressionContext' -
    maybe not public?</p>
  </blockquote>
  
  <p>How can I solve this ?</p>