Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在任何情况下,我们都需要将spring bean定义为注释以及spring xml。
如果不是,哪一个更易维护,更有优势。
提前致谢, 凯瑟尔
You do not need to do both. It is a case of one or the other.
I personally prefer having an xml file, as it allows me to see all of the resources I am wiring in one place, but it comes down to a matter of opinion.