如何架构Springboot2.0,以及基于SpringBoot配置打包

SpringBoot 微服务项目架构

comex-app————父项目

---comex-app-basics————基础架构

------comex-app-basics-gateway————网关

---comex-app-common————公共模块

------comex-app-common-cache——公共缓存工具模块

------comex-app-common-core——公共核心工具模块

---comex-app-service-base——基础业务模块

---comex-app-service-api——API父工程

------comex-app-service-account-api——account API模块

---comex-app-service-impl————业务API实现父工程

------comex-app-service-account-impl——account API业务实现模块

Maven打包配置

1、父项目pom.xml中添加如下配置,用以打包时跳过测试类,当然使用mvn install -DskipTests进行打包。

    
        true
    

2、basics基础架构父工程pom.xml添加如下配置


    
        
            
                org.springframework.boot
                spring-boot-maven-plugin
            
            
                org.mybatis.generator
                mybatis-generator-maven-plugin
                1.3.2
                
                    true
                    true
                
            
        
    

3、common工具包父工程pom.xml添加如下配置

    
        
            
                
                org.apache.maven.plugins
                maven-compiler-plugin
                3.7.0
                
                    1.8
                    1.8
                    UTF-8
                
            
        
    

4、service-api业务API层父工程pom.xml添加如下配置

    
        
            
                org.apache.maven.plugins
                maven-compiler-plugin
                3.7.0
                
                    1.8
                    1.8
                    UTF-8
                    
                        lib
                    
                
            
        
    

5、service-impl业务API实现层父工程pom.xml添加如下配置

    
        
            
                org.springframework.boot
                spring-boot-maven-plugin
            
            
                org.mybatis.generator
                mybatis-generator-maven-plugin
                1.3.2
                
                    true
                    true
                
            
        
    

6、利用IDEA Maven工具对app父工程进行打包操作

如何架构Springboot2.0,以及基于SpringBoot配置打包_第1张图片

你可能感兴趣的:(实践总结,微服务Maven打包,SpringBoot,打包,IDEA,Maven打包,Maven打包跳过测试)