Home  >  Q&A  >  body text

What is the best way to name spring directory structure?

I have been struggling with the naming of model bean domain dao. I saw that they are all different on the Internet and I am a little confused.

迷茫迷茫2712 days ago723

reply all(5)I'll reply

  • 曾经蜡笔没有小新

    曾经蜡笔没有小新2017-05-17 10:09:09

    Using SPRING INITIALIZR will automatically generate the directory structure. Idea also supports it

    reply
    0
  • 我想大声告诉你

    我想大声告诉你2017-05-17 10:09:09

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-05-17 10:09:09

    It’s just a few English words, just understand them. If you have time to worry about naming, how much code can you write

    reply
    0
  • PHP中文网

    PHP中文网2017-05-17 10:09:09

    Package is used to distinguish classes that store different functions. I have also seen that many projects are named in different ways, but this does not have a big impact. It is just a development standard habit. The naming method of package, if you are For company projects, you can follow the company's specifications. For personal projects, you can also develop your own naming convention. The picture of @公孙二狗 on the floor can be used as a reference

    Back to the question, what you call model bean domain dao

    Model domain can be said to store POJO, for example, it stores students' grades (students). Personally, it is recommended not to name the bean this way, because the interface implementation class is also a bean, and the student's grade class is also a bean, so It is not recommended to name the package after beans (if you have an expert, please give me a thumbs up, I am just a novice)
    dao stores some classes that operate on the persistence layer

    Above

    reply
    0
  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-17 10:09:09

    It is better to name according to function and module

    reply
    0
  • Cancelreply