java - 为什么IDEA有时生成的实体不是属性和方法分开的
巴扎黑
巴扎黑 2017-04-17 17:57:52
0
2
372

为什么IDEA有时生成的实体不是属性和方法分开的

不应该的

正常应该如此

这个实体单独生成的话报错

巴扎黑
巴扎黑

reply all(2)
Ty80

This may be related to the settings
Editor > Code Style > Java Editor > Code Style > Java
在Arrangement标签下可以自由设置属性和方法的排序规则You can freely set the sorting rules for properties and methods under the Arrangement tag

You may need to reformat before sorting. Try it yourself. The screenshot below is part of my settings

刘奇

Are you using the hibernate entity generation class that comes with idea? This generation seems to be like this, but if you use idea's getter/setter generation, it is impossible to do this. This will only happen if you export entity classes from the database

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template