title: Is there any way to pass @Autowired variable to some other class in a Spring Boot application?
body: <p>In my Spring Boot application, I have class A. In that class, I have declared my DAO layer variable with @Autowired annotation. I have a separate Java library which contains class B (which has a method that accepts generic parameters). I want to send the @Autowired variable from class A as a parameter to the method of class B and perform some operation with that variable in class B's method. </p>
  
  <p>Is there any way to achieve this? Will the second class be aware of the context?</p>