OnJava:利用metadata来验证数据

很多开发人员都在不停的抱怨他们不得不管理数量众多的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."

In this article, we will summarize how configuration data is managed today and what metadata will offer in the future, followed by an implementation of how annotations can be used in a simple validation framework

原文见: http://www.onjava.com/pub/a/onjava/2005/01/19/metadata_validation.html

(另:在第二期的java电子杂志里也将专门论述annotation)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值