Springboot 静态资源从jar中分离


            
                org.apache.maven.plugins
                maven-compiler-plugin
                
                    1.8
                    1.8
                    UTF-8
                
            
            
                org.apache.maven.plugins
                maven-surefire-plugin
                
                    true
                
            
            
                org.springframework.boot
                spring-boot-maven-plugin
                ${spring.version}
                
                    
                        
                            repackage
                        
                    
                
                
                    com.xx.xx.App
                    true
                    true
                    ${project.build.directory}/jar
                
            
            
            
                org.apache.maven.plugins
                maven-jar-plugin
                
                    
                    
                        static/**
                        templates/**
                        *.yml
                        language/**
                        
                    
                    
                        
                            true
                            
                            lib/
                            
                            false
                            
                            com.xx.xx.App
                        
                        
                            
                            ./config/
                        
                    
                    ${project.build.directory}
                
            
            
            
                org.apache.maven.plugins
                maven-dependency-plugin
                
                    
                        copy-dependencies
                        package
                        
                            copy-dependencies
                        
                        
                            ${project.build.directory}/lib/
                        
                    
                
            

            
            
                maven-resources-plugin
                
                     
                        copy-resources
                        package
                        
                            copy-resources
                        
                        
                            
                                
                                    src/main/resources
                                    
                                        *.yml
                                        static/**
                                        templates/**
                                        language/**
                                    
                                
                            
                            ${project.build.directory}/config
                        
                    
                
            
        

 

你可能感兴趣的:(springboot)