DWR中一些使用annotation 的地方:
//To make a simple class available for remote access, use the @Create and @RemoteMethod annotations:
@Createpublic class RemoteFunctions
{
@RemoteMethod
public int calculateFoo() {
return 42;
}
}
//To make simple bean classes available for remote access, use the @Convert and @RemoteProperty annotations:
@Convertpublic class Foo {
@RemoteProperty private int foo;
public int getFoo() {
return foo;
}
@RemoteProperty
public int getBar() {
return foo * 42;
}
}
对于这种对annotations的用法,你如何看待呢?
官方站点:
http://getahead.ltd.uk/dwr/server/annotations
AJAX论坛:
http://www.matrix.org.cn/topic.shtml?forumId=41
标签: