1
我的许多服务都暴露了DAO的。因此,我创建了这些服务的接口:是否支持使用GWT RequestFactory支持RequestContext的接口?
public interface DAORequestContext<T extends SRSProxyBase> extends RequestContext {
Request<T> find(Long id);
Request<T> load(Long id);
Request<T> save(T id);
}
然而,当(在我RequestFactory无注释)扩展这个接口:
public interface SafeRideRequestFactory extends RequestFactory {
public UserService userService();
@Service(value = UserDAO.class, locator = DAOServiceLocator.class)
interface UserService extends DAORequestContext<SRSUserProxy> { }
}
我得到的运行时异常:
[ERROR] org.saferide.shared.service.DAORequestContext has no mapping to a domain type (e.g. @ProxyFor or @Service)
[ERROR] The type org.saferide.shared.service.DAORequestContext must be annotated with a @Service or @ServiceName annotation
[ERROR] The RequestContext type org.saferide.shared.service.DAORequestContext did not pass validation
[ERROR] Unexpected error
com.google.web.bindery.requestfactory.server.UnexpectedException: The RequestContext type org.saferide.shared.service.DAORequestContext did not pass validation
仅允许RequestContext的直接后代?有没有人遇到过这个?
太棒了。谢谢。 – squinlan