Springboot多模块下,父模块如何引入子模块



    4.0.0
    org.sang
    Test
    1.0.0-SNAPSHOT
    pom

    Test
    Test项目

    
        YouMiCommon
        YouMiApi
    

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

    
        UTF-8
        UTF-8
        1.8
    

    
        ....省略引入包
    

    
        
            
                src/main/java
                
                    **/*.xml
                
            
            
                src/main/resources
            
        
        
            
                org.springframework.boot
                spring-boot-maven-plugin
                
                    
                    org.sang.YouMiApplication
                    ZIP
                    
                        
                        
                            nothing
                            nothing
                        
                    
                
                
                    
                        
                            repackage
                        
                    
                
            
        
    




    4.0.0

    org.sang.common
    TestCommon
    0.0.1-SNAPSHOT
    
    jar

    TestCommon
    通用

    
        org.sang
        Test
        1.0.0-SNAPSHOT
        ../pom.xml
    

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

因 API 项目需要引入 Common 项目



    4.0.0

    org.sang.api
    TestApi
    0.0.1-SNAPSHOT
    
        
            org.sang.common
            TestCommon
            0.0.1-SNAPSHOT
            compile
        
    
    jar

    TestApi
    Api

    
        org.sang
        Test
        1.0.0-SNAPSHOT
        ../pom.xml
    

    
        
            
                src/main/java
                
                    **/*.xml
                
            
            
                src/main/resources
            
        
        
            
                org.springframework.boot
                spring-boot-maven-plugin
                
                    
                    org.sang.YouMiApplication
                    ZIP
                    
                        
                        
                            nothing
                            nothing
                        
                    
                
                
                    
                        
                            repackage
                        
                    
                
            
        
    

你可能感兴趣的:(Springboot多模块下,父模块如何引入子模块)