annotation扫描
2018-11-26 本文已影响0人
庙人
annotation扫描是将类上带有 @Controller @Service @Component @Resource 注解的类变为BeanDefinition
与xml原理一样,其区别主要是
xml: 零侵入,项目变大配置文件会很大或者比较混乱
annotation:方便使用,但是侵入性太强
annotation扫描是将类上带有 @Controller @Service @Component @Resource 注解的类变为BeanDefinition
与xml原理一样,其区别主要是
xml: 零侵入,项目变大配置文件会很大或者比较混乱
annotation:方便使用,但是侵入性太强