Difference between and

前端 未结 15 2458
再見小時候
再見小時候 2020-11-22 04:44

I\'m learning Spring 3 and I don\'t seem to grasp the functionality behind and .

15条回答
  •  攒了一身酷
    2020-11-22 05:47

    A custom tag registers the same set of bean definitions as is done by , apart from its primary responsibility of scanning the java packages and registering bean definitions from the classpath.

    If for some reason this registration of default bean definitions are to be avoided, the way to do that is to specify an additional "annotation-config" attribute in component-scan, this way:

    
    

    Reference: http://www.java-allandsundry.com/2012/12/contextcomponent-scan-contextannotation.html

提交回复
热议问题