我的Java有点生疏(过去几年一直在做C# )。我也希望这不是一个非常主观的问题。{ public int Age { get; set; }}
等价的Java版本会是什么样的呢?我知道我可以编写一堆getter和setter(但是说我有10+属性),感觉就像很多样板。我意识到没有“正确的答案”,但是,我更感兴趣的是一般惯
我尝试通过一些字段来扩展我的用户,比如姓氏和名字……我按照文档上说的那样做,Neither the property "name" nor one of the methods"isName()", "hasName()", "__get()" exist and have public access in class "AppBundle\Entity\User"
这是我的注册类Symfo