search

Home  >  Q&A  >  body text

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

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

不应该的

正常应该如此

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

巴扎黑巴扎黑2890 days ago373

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 17:59:52

    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

    reply
    0
  • 怪我咯

    怪我咯2017-04-17 17:59:52

    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

    reply
    0
  • Cancelreply