Performance difference between spring javaconfig, xml config and annotations

前端 未结 4 561
天命终不由人
天命终不由人 2021-01-12 10:50

Our Spring configuration contains about 1200 beans, and we use component-scan/@Autowired. If we exported the ApplicationContext as an Xml (and still used @Autowired), we sav

4条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-12 11:27

    I would guess a bit less, because no parsing will have ho happen (the annotations are 'parsed' with reflection, the xml - with an xml parser).

    That, however, should not be a reason to choose one configuration option over the other. Startup time is not important for performance.

提交回复
热议问题