0
我正在尝试使用Hermes在GWT中实现服务器端常量。我使用爱马仕1.2和GWT 2.5。我已经将Hermes添加到我的构建路径并导入到我的WEB-IF \ lib中。我有一个ServerConstants.java文件和ServerConstants.properties在我的服务器软件包文件,但是当我去创建一个常数随GWT:服务器端的hermes
ServerConstants constants = Hermes.get(ServerConstants.class, "en");
反对我得到这个错误。
Default constructor cannot handle exception type IOException thrown by implicit super constructor. Must define an explicit constructor
我不能在ServerConstants.java创建一个构造函数,因为它是一个接口,所以我究竟在这个谜失踪?如果它很重要,这里是我ServerConstants.java文件
package com.cbs.ioma.server;
import com.google.gwt.i18n.client.Constants;
public interface ServerConstants extends Constants {
String test();
}
}
的可能重复[GWT:获取服务器端的常量(http://stackoverflow.com/questions/12714278/gwt-get-constants-in-server -侧) – slugmandrew