我正在使用Gilead将我的实体保留在我的GWT项目中,我也使用了hibernate注释.我的问题出在我的onetomany association.t这是我的User类,它包含对FileLocations列表的引用
@Entity
@Table(name = "yf_user_table")
public class YFUser implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "user_id",nullable = false)
private int userId;
@Column(name = "username")
private String username;
@Column(name = "password")
private String password;
@Column(name = "email")
private String email;
Run Code Online (Sandbox Code Playgroud)
@OneToMany(cascade = CascadeType.ALL,fetch = FetchType.LAZY)@JoinColumn(name ="USER_ID")private List fileLocations = new ArrayList();
这是我的文件位置类
@Entity
@Table(name = "fileLocationTable")
public class FileLocation implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.AUTO)
@Column(name = "locationId", updatable = false, nullable = false)
private int ieId; …Run Code Online (Sandbox Code Playgroud) 我有一个GWT应用程序(由roo生成),我决定用Spring Security保护它.Roo生成一个login.jspx页面作为安全设置的一部分,这个jspx使用一些基本的JSTL标记库.
在开发模式下运行时,基础Jetty服务器显然不喜欢这样.具有以下Maven依赖项
<dependency>
<groupId>javax.servlet.jsp.jstl</groupId>
<artifactId>jstl-api</artifactId>
<version>1.2</version>
<classifier/>
</dependency>
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>jstl-impl</artifactId>
<version>1.2</version>
<classifier/>
</dependency>
Run Code Online (Sandbox Code Playgroud)
我明白了
java.lang.AbstractMethodError: javax.servlet.jsp.PageContext.getELContext()Ljavax/el/ELContext;
Run Code Online (Sandbox Code Playgroud)
我的猜测是jstl-impl依赖与Web容器已经提供的相互冲突,但当我将其范围更改为提供时,我得到:
org.apache.jasper.JasperException: /WEB-INF/views/login.jspx(22,69) The attribute prefix fn does not correspond to any imported tag library
Run Code Online (Sandbox Code Playgroud)
有人让这个成功地工作了吗?
PS我听说有传言你可以将应用程序导出到Tomcat,它运行正常,但GWT编译可能是一个耗时的操作,所以在开发模式下工作会很棒.