标签:扫描 top ring enables 增强 修改 range java 没有
The use of <context:component-scan> implicitly enables the functionality of <context:annotation-config> . There is usually no need to include the <context:annotation-config> element when using <context:component-scan> . |
@Configuration
public class AppConfig {
@Bean
public MyService myService() {
return new MyServiceImpl();
}
}
<beans>
<bean id="myService" class="com.acme.services.MyServiceImpl"/>
</beans>
<!--在使用aop注解时需要在xml文件添加下注解-->
<aop:aspectj-autoproxy></aop:aspectj-autoproxy>
标签:扫描 top ring enables 增强 修改 range java 没有
原文地址:https://www.cnblogs.com/baiyifengyun/p/13780955.html