Arguments Against Annotations

前端 未结 12 1797
北海茫月
北海茫月 2020-12-23 13:48

My team is moving to Spring 3.0 and there are some people who want to start moving everything into Annotations. I just get a really bad feeling in my gut (code smell?) when

12条回答
  •  时光取名叫无心
    2020-12-23 14:15

    Check these answers to similar questions

    What are the Pros/Cons of Annotations (non-compiler) compared to xml config files

    Xml configuration versus Annotation based configuration

    Basically it boils down to: Use both. Both of them have there usecases. Don't use annotations for things which should remain configurable without recompiling everything (especially things which maybe your user should be able to configure without needing you to recompile all)

提交回复
热议问题