很多开发人员都在不停的抱怨他们不得不管理数量众多的XML配置文件。随着java新版JDK(Tiger)带来新的元数据,那些框架下的公共配置将通过annotation写入到java源代码中。
在这篇文章中我们将通过一个数据验证框架的例子来回顾现有的配置数据管理,以及元数据将给我们带来那些好处。
Many developers have been complaining about having to manage numerous XML configuration files alongside their Java code. With the recent addition of metadata to Java, common configuration details in frameworks can now be rolled right into your Java files through annotations. For a brief introduction to metadata and annotations, see Sun's article "J2SE 5.0 in a Nutshell."
原文见: http://www.onjava.com/pub/a/onjava/2005/01/19/metadata_validation.html
(另:在第二期的java电子杂志里也将专门论述annotation)
Java元数据与注解在配置管理中的应用
许多开发人员抱怨管理大量XML配置文件的繁琐。随着Java新版JDK带来新元数据,框架下的公共配置可通过注解写入Java源代码。文章以数据验证框架为例,回顾现有配置数据管理,介绍元数据带来的好处。
13万+

被折叠的 条评论
为什么被折叠?



