现在的位置: 首页 > 综合 > 正文

DWR 2.0M2 加入 annotation支持

2012年08月15日 ⁄ 综合 ⁄ 共 324字 ⁄ 字号 评论关闭
           annotation热潮使得越来越多的框架来支持它,DWR2.0也开始支持annotation.
         以下是两个例子:
@Create
public class RemoteFunctions {
@RemoteMethod
public int calculateFoo() {
return 42;
}
}

@Convert
public class Foo {
@RemoteProperty
private int foo;

public int getFoo() {
return foo;
}

@RemoteProperty
public int getBar() {
return foo * 42;
}
}

    是不是很酷呢?如果你正在使用DWR,这个改进又可以让我们省掉了很多工作.

抱歉!评论已关闭.