我有项目A,它包含多个项目之间共享的所有域对象。另外,它是基于GWT的项目B,我想使用客户端。
根据我所做的阅读,以下是我目前的设置方式:
项目A: com.foo.bar.domain。* - >包含对象
项目B: 通过Maven对项目A有依赖性。 com.foo.bar.Domain.gwt.xml:
<module>
<inherits name='com.google.gwt.user.User' />
<source path="domain" />
</module>
主模块包含:
<inherits name="com.eyereturn.operations.Operations"/>
但是当我尝试运行代码服务器
时,我仍然会得到以下内容No source code is available for type com.foo.bar.domain.User; did you forget to inherit a required module?
答案 0 :(得分:1)
根据您提供的详细信息,我只建议将源路径设置为绝对路径。 (你也可以试试“./domain”)
答案 1 :(得分:1)
您得到的错误是因为项目A无法找到&#34;模块&#34;项目B.遵循以下步骤
<inherits name="com.project.example.b"/>
答案 2 :(得分:0)
没有源代码可用于com.foo.bar.domain.User类型;你忘了继承一个必需的模块吗?
在编译时,B
无法找到您使用过的User
包结构。所以它给出了这样的错误。
你可以制作存在User
类的gwt项目,或者需要创建另一个可以共享到A
和B
项目的bean的公共项目。之后,您必须将公共项目继承到B.gwt.xml