关闭有关 Eclipse 中缺少 no-arg 构造函数"error"



我正在使用open-jpa,正如我们所知,它附带了增强器,可以在增强过程中创建非私有的无arg构造函数。它有效,但是日食有问题。它不知道在 ant 构建过程中会发生什么是很合理的,所以是否有可能关闭这个特定的错误The Java class for mapped type ... must define a non-private zero-argument constructor限制@Entity注释?

这对

我有用(Eclipse Mars.1 Release 4.5.1)

Project / Properties / JPA / Errors/Warnings
Enable Project Specific Settings
 Type
  ID class must have a public no-arg constructor (change from Error to something else)
您也可以

简单地创建一个non-private zero-arg constructor

例如:

public foo(){
   super();
}

最新更新