Gwt 从RequestContext方法返回Void
RequestContext方法中存在的方法能否返回void 如果我的请求上下文如下所示Gwt 从RequestContext方法返回Void,gwt,requestfactory,Gwt,Requestfactory,RequestContext方法中存在的方法能否返回void 如果我的请求上下文如下所示 @Service( value = PersonUtil.class, locator = PersonLocator.class ) public interface PersonRequest extends RequestContext { Request<void> testMethod( Long id ); ...... } @Service(value=Pers
@Service( value = PersonUtil.class, locator = PersonLocator.class )
public interface PersonRequest extends RequestContext
{
Request<void> testMethod( Long id );
......
}
@Service(value=PersonUtil.class,locator=PersonLocator.class)
公共接口PersonRequest扩展了RequestContext
{
请求testMethod(长id);
......
}
我得到这个错误:
这条线上有多个标记
-缺少方法的返回类型
-标记“void”上的语法错误,应为后面的维度
我们不能创建返回类型为void的方法吗?若否,原因为何
提前感谢。
void
就像int
或boolean
等基本类型一样,不能将其用作类型参数
就像你会使用
Integer
而不是int
,你会在这里使用Void
(java.lang.Void
)谢谢。我错过了最基本的东西。