Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You can mix and match declaring beans in XML and annotating them with @Component/@Service/@Repository. You can use @Autowired both in beans declared in XML and in beans annotated with @Component/@Service/@Repository. You can use @Autowired to inject beans declared in XML into annotated beans, and to inject annotated beans into beans declared in XML.</p> <p>&lt;context:annotation-config/> just enables support for dependency injection of managed beans using @Autowired, along with some other features. </p> <p><a href="http://static.springsource.org/spring/docs/3.2.x/spring-framework-reference/html/beans.html#beans-annotation-config" rel="nofollow">http://static.springsource.org/spring/docs/3.2.x/spring-framework-reference/html/beans.html#beans-annotation-config</a></p> <p>&lt;context:component-scan ... /> enables everything that &lt;context:annotation-config/> enables, plus, support for @Component/@Service/@Repository, and more. Generally you'll just need to use only &lt;context:component-scan/>.</p> <p><a href="http://static.springsource.org/spring/docs/3.2.x/spring-framework-reference/html/beans.html#beans-classpath-scanning" rel="nofollow">http://static.springsource.org/spring/docs/3.2.x/spring-framework-reference/html/beans.html#beans-classpath-scanning</a></p> <p>"unmanaged" beans are beans that are neither declared in your XML nor annotated and component scanned. You can apparently try to use Spring to inject dependencies into unmanaged beans, using AOP, and &lt;context:spring-configured/>. See the docs here for more info:</p> <p><a href="http://static.springsource.org/spring/docs/3.2.x/spring-framework-reference/html/aop.html#aop-atconfigurable" rel="nofollow">http://static.springsource.org/spring/docs/3.2.x/spring-framework-reference/html/aop.html#aop-atconfigurable</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload