【spring】常用注解作用归纳

<context:annotation-config />:激活多个注解,@Required and @Autowired;@PostConstruct, @PreDestroy and @Resource;@WebServiceRef;@EJB ;@PersistenceContext and @PersistenceUnit。 不能激活@Transactional ,@TransactionAttribute。

context:component-scan:包含context:annotation-config的功能。

原文地址:https://www.cnblogs.com/stxyg/p/8435604.html