简体   繁体   English

Querydsl从Maven依赖项生成实体

[英]Querydsl generate entity from maven dependency

I know, this is a know question, that has been already asked here . 我知道,这是一个已知的问题,已经在这里提出 The answer suggests to use the @QueryEntities. 答案建议使用@QueryEntities。 But I did not understand how to use this annotation and where to use it. 但是我不明白如何使用此注释以及在何处使用它。 Does anyone have an example to show me this working? 有谁有例子向我展示这个工作? Or better yet, is there a better way to solve this? 还是更好,有没有更好的方法来解决这个问题?

You should new a package-info.java file in your package 您应该在包中新建一个package-info.java文件

@QueryEntities(value = {BaseEntity.class}) package xxxx.xxxx.xxx;
import com.querydsl.core.annotations.QueryEntities; 
import xxx.xxxx.BaseEntity;

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM