spring boot 增量包部署,jar包变小

##pom.xml配置


            
                org.springframework.boot
                spring-boot-maven-plugin
                
                    ZIP
                    
                        
                            non-exists
                            non-exists
                        
                    
                
            
            
                org.apache.maven.plugins
                maven-dependency-plugin
                
                    
                        copy-dependencies
                        package
                        
                            copy-dependencies
                        
                        
                            
                            ${project.build.directory}/lib
                            false
                            false
                        
                    
                
            
            
                org.apache.maven.plugins
                maven-compiler-plugin
                
                    1.8
                    1.8
                
            
        

##编译目录结构

spring boot 增量包部署,jar包变小_第1张图片

##运行时拷贝lib目录的jar包到zsjf-resources-file-1.0.jar同级目录。-Dloader.path指定lib目录

java -jar -Dloader.path=./lib zsjf-resources-file-1.0.jar

你可能感兴趣的:(spring,boot,后端,java)