ApiResourceProperty标记无法编译为GWT或被忽略

时间:2022-12-17 23:11:15

We have a GWT app that exposes an API using Google Cloud Endpoints. As we use objectify we can not expose the Key tag to the API. For that we use the ApiResourceProperty in order to make the API ignore the field, but if we do that the GWT compilation fails.

我们有一个GWT应用程序,使用Google Cloud Endpoints公开API。当我们使用objectify时,我们无法将Key标记暴露给API。为此,我们使用ApiResourceProperty以使API忽略该字段,但如果我们这样做,则GWT编译失败。

I have tried everything, from using the exclude from source in the gwt.xml to using the @gwtincompatible

我已经尝试了所有方法,从使用gwt.xml中的exclude from source到使用@gwtincompatible

So... is there a way to ignore the ApiResourceProperty.class in the GWT compilation?

那么......有没有办法忽略GWT编译中的ApiResourceProperty.class?

Any other idea? If not I would have to duplicate my entities for the API

还有其他想法吗?如果不是,我将不得不复制我的API实体

Thanks in advance

提前致谢

1 个解决方案

#1


0  

The only option I had was to create custom DTOs for the API.

我唯一的选择是为API创建自定义DTO。

#1


0  

The only option I had was to create custom DTOs for the API.

我唯一的选择是为API创建自定义DTO。