SpringBoot 搭建多模块的后台项目-SSM(一)整体项目结构

1.开发工具及系统环境

IDE  
系统环境 Windows7

2.环境版本

SpringBoot 2.0.1.RELEASE
Java 1.8
   

3.模块说明

SpringBoot 搭建多模块的后台项目-SSM(一)整体项目结构_第1张图片

 

4.搭建过程


          [1] 创建父工程

                 1.1)File ----> New ----> Project...

SpringBoot 搭建多模块的后台项目-SSM(一)整体项目结构_第2张图片

                        1.2) 填写GroupID,ArtifactID

 SpringBoot 搭建多模块的后台项目-SSM(一)整体项目结构_第3张图片

                 1.3)选择SpringBoot版本,以及Lombok等公共jar包

SpringBoot 搭建多模块的后台项目-SSM(一)整体项目结构_第4张图片

                  1.4)点击完成

SpringBoot 搭建多模块的后台项目-SSM(一)整体项目结构_第5张图片

       1.5) 之后,项目结构如下图

SpringBoot 搭建多模块的后台项目-SSM(一)整体项目结构_第6张图片

        1.6) 删除其他项目,只保留图片中红色框中部分,以及.gitignore文件,最终项目结构

SpringBoot 搭建多模块的后台项目-SSM(一)整体项目结构_第7张图片

       1.7)父项目的pom文件修改



    4.0.0
    
    com.powerlong
    xpoject
    0.0.1-SNAPSHOT
    pom

    xpoject
    xpoject-web project for Spring Boot

    
    
        org.springframework.boot
        spring-boot-starter-parent
        2.0.1.RELEASE
         
    

    
    
        xproject-common
        xproject-domain
        xproject-dao
        xproject-service
        xproject-web
    

    
        
        0.0.1-SNAPSHOT
        UTF-8
        UTF-8
        1.8
        4.4.2
        2.0.1.RELEASE
    
    
    
        
            
                org.springframework.boot
                spring-boot-configuration-processor
                ${spring.boot.configuration.processor.version}
            
        
    
    
    
        
            org.springframework.boot
            spring-boot-starter
        
        
        
            org.springframework.boot
            spring-boot-devtools
            runtime
            true
        
        
            org.projectlombok
            lombok
            true
        
        
        
            cn.hutool
            hutool-all
            ${hutool.version}
        

        
            org.springframework.boot
            spring-boot-starter-test
            test
            
                
                    org.junit.vintage
                    junit-vintage-engine
                
            
        
    

    
        
            
                org.springframework.boot
                spring-boot-maven-plugin
                
                    true 
                
            
        
    

    
    

    
    

    
    



   [2] 创建子模块

         2.1) 创建xproject-web,xproject-domain,xproject-service,xproject-dao,xproject-common模块

        2.2) 修改各个子模块的pom文件后

        web子模块的pom文件



    4.0.0

    com.powerlong
    xproject-web
    ${xproject.version}
    war

    xproject-web
    xproject-web project for Spring Boot

    
        com.powerlong
        xpoject
        0.0.1-SNAPSHOT
         
    

    
        
            org.springframework.boot
            spring-boot-starter-web
        
        
        
            org.springframework.boot
            spring-boot-configuration-processor
        
        
            com.powerlong
            xproject-service
            ${xproject.version}
        
    


      service子模块的pom文件,domain,common,dao模块基本一样



    4.0.0

    com.powerlong
    xproject-service
    ${xproject.version}
    jar

    xproject-service
    xproject-service project for Spring Boot

    
        com.powerlong
        xpoject
        0.0.1-SNAPSHOT
         
    

    
        
            com.powerlong
            xproject-dao
            ${xproject.version}
        
    


5.现象

SpringBoot 搭建多模块的后台项目-SSM(一)整体项目结构_第8张图片

你可能感兴趣的:(ssm)