Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
305 views
in Technique[技术] by (71.8m points)

java spring boot 项目结构

最近在学习做 java 的项目,然后对于java 项目结构的划分比较疑惑,感觉标准不怎么统一,自己琢磨了下,参考公司项目写了如下自认为比较优化的结构

com.packagename.demo
    core
        base
            annotation
            controller
            enums
            mapper
            service
            vo
        util
        config
    modules
         admim
              default
                    controller
                    service
                    mapper
                    entity
                    VO
               xxx
               xxx1
         user
              default(index)根据爱好
                    controller
                    service
                    mapper
                    entity
                    VO
               xxx
               xxx1

说明:

  • moudles 项目的各个模块和表结构有强相关性,比如 表明为 admin,admin_xxx,admin_xxx1 统一都在 admin 模块下,admin表 对应 default目录,admin_xxx 对应 xxx目录

  • core 为所有模块公用的内容

  • default 和 xxxx 目录下的子目录结构基本一致,根据实际情况,比如 vo 目录可有可无

请大家就这个项目的目录结构给出评价,让我能更合理的划分项目结构


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...