作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我关注了this tutorial并决定使用Gilead以避免编写 DTO 样板。
但是还没有成功。我按照教程建议做了:
使我的 POJO 在服务器端扩展 net.sf.gilead.pojo.java5.LightEntity
公共(public)类 Attachment 扩展 LightEntity 实现可序列化 { ... }
使我的服务器端服务实现扩展net.sf.gilead.gwt.PersistentRemoteService
公共(public)类LoginServiceImpl扩展PersistentRemoteService实现LoginService {...}
完全按照教程中的方式配置 beanManager。
当我尝试使用扩展吉利德 LightEntity 的服务器端类时,我收到错误,如果没有吉利德,只有受限的服务器代码。
以下是我包含在构建路径中的 JAR:
最佳答案
将 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/
我是一名优秀的程序员,十分优秀!