annotation扫描是将类上带有 @Controller @Service @Component @Resource 注解的类变为BeanDefinition
与xml原理一样,其区别主要是
xml: 零侵入,项目变大配置文件会很大或者比较混乱
annotation:方便使用,但是侵入性太强
annotation扫描是将类上带有 @Controller @Service @Component @Resource 注解的类变为BeanDefinition
与xml原理一样,其区别主要是
xml: 零侵入,项目变大配置文件会很大或者比较混乱
annotation:方便使用,但是侵入性太强
本文标题:annotation扫描
本文链接:https://www.haomeiwen.com/subject/hrbbqqtx.html
网友评论