title: Spring bean not getting Autowired from custom library
body: <p>I have created by own library(com.custom.mylib) which returns a string like below.</p>
  <pre><code>@Component
  public class MyLibrary{
  
      @Value(&quot;${str.message}&quot;)
      private String message; //This val should come from app which is going to use this lib
      public String readMessage() {
          return message;
      }
  </code></pre>
  <p>I have create a project which is going to use above library. I have included  the lib as pom dependency .But when I  try to call library method from my app. I get the error below.
  How to resolve it?</p>
  <pre><code>   @Autowired
      private MyLibrary myLibrary;
  </code></pre>
  <blockquote>
  <p>Consider defining a bean of type 'com.custom.mylog.MyLibrary' in your
  configuration.</p>
  </blockquote>
  <p>I also have below in application.properties file so that library can pick the value up</p>
  <pre><code>str.message=Hello world
  </code></pre>