我的代码如下所示:
@Document(collection = "address")
public class Address implements Serializable {
private static final long serialVersionUID = 1L;
@Id
private String id;
@Field("address_id")
private Integer addressId;
}
public interface AddressRepository extends MongoRepository<Address,String> {
}
问题是QueryDSL的文档提到了morphia @Entity注释,但Springs文档声称Spring-Data支持QueryDSL?问题是:如果我使用Spring-Data,如何创建QueryDSL工件?
答案 0 :(得分:1)
解决方案:使用@QueryEntity和com.mysema.query.apt.QuerydslAnnotationProcessor