Spring Boot + Elastic Beanstalk .ebextensions in JAR

前端 未结 5 1909
遇见更好的自我
遇见更好的自我 2021-02-13 15:44

I have a very standard Spring Boot application (with a application.properties properties file located in standard /src/main/resources folder) which I\'

5条回答
  •  无人及你
    2021-02-13 16:19

    The solution proposed by Lorena Salamanca Spring Boot + Elastic Beanstalk .ebextensions in JAR not works for me... :\

    My solution works with Spring 1.5.3.RELEASE

    Add .ebextensions in the root of your project and add this snippet at the end in the plugins section:

    
                org.apache.maven.plugins
                maven-antrun-plugin
                1.6
                
                    
                        prepare
                        package
                        
                            
                                
                                
                                    
                                
                                
                                
                            
                        
                        
                            run
                        
                    
                
            
    

    This plugin use ant to unzip the final jar generated by spring boot, copy the .ebextensions in the root and zip (jar) again with the same name. Tested and working in production :)

提交回复
热议问题