What is the best way to name spring directory structure?
迷茫
迷茫 2017-05-17 10:07:09
0
5
719

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.

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(5)
曾经蜡笔没有小新

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

伊谢尔伦

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

洪涛

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

过去多啦不再A梦

It is better to name according to function and module

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!