ITeye博客

Annotation和xml哪个好?

llade · 2008-04-12 11:56 · Spring · Markdown

各有优劣 spring 配置里xml + autoproxy的方式可以工作的很好。但target bean 要管理好,名字或者类型要有特征性,以便autoproxy能够识别。 annotation 也能工作的很好,但分散到了每个具体的类。最好是要annotation的方法集中到父类。这样避免了分散。

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。