gpt4 book ai didi

java - GWT - 配置吉利德问题

转载 作者:行者123 更新时间:2023-12-01 05:50:57 27 4
gpt4 key购买 nike

我关注了this tutorial并决定使用Gilead以避免编写 DTO 样板。

但是还没有成功。我按照教程建议做了:

  1. 使我的 POJO 在服务器端扩展 net.sf.gilead.pojo.java5.LightEntity

    公共(public)类 Attachment 扩展 LightEntity 实现可序列化 { ... }

  2. 使我的服务器端服务实现扩展net.sf.gilead.gwt.PersistentRemoteService

    公共(public)类LoginServiceImpl扩展PersistentRemoteService实现LoginService {...}

  3. 完全按照教程中的方式配置 beanManager。

当我尝试使用扩展吉利德 LightEntity 的服务器端类时,我收到错误,如果没有吉利德,只有受限的服务器代码。

以下是我包含在构建路径中的 JAR:

alt text

最佳答案

将 MusicStoreServiceImpl() 更改为

public MusicStoreServiceImpl() {
gileadHibernateUtil.setSessionFactory(com.google.musicstore.util.HibernateUtil
.getSessionFactory());

PersistentBeanManager persistentBeanManager = new PersistentBeanManager();
persistentBeanManager.setPersistenceUtil(gileadHibernateUtil);
StatelessProxyStore sps = new StatelessProxyStore();
sps.setProxySerializer(new GwtProxySerialization());
persistentBeanManager.setProxyStore(sps);
setBeanManager(persistentBeanManager);

}

关于java - GWT - 配置吉利德问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4702668/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com