gpt4 book ai didi

java - 关闭 "error"关于在 Eclipse 中缺少无参数构造函数

转载 作者:塔克拉玛干 更新时间:2023-11-03 05:25:43 25 4
gpt4 key购买 nike

我正在使用 open-jpa,正如我们所知,它附带增强器,可以在增强期间创建非私有(private)无参数构造函数。它可以工作,但是 Eclipse 有问题。它不知道在 ant build 期间会发生什么是很合理的,因此是否有可能关闭此特定错误 The Java class for mapped type ... must define a non-private zero-argument constructor 绑定(bind)到@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)

关于java - 关闭 "error"关于在 Eclipse 中缺少无参数构造函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20869112/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com