Submitting spring boot application jar to spark-submit

前端 未结 4 1770
野的像风
野的像风 2021-02-08 17:58

I am pretty new to spark, and i am trying to try out spark submit. I created an application in spring boot , used mvn package to create a jar . But when i am trying

4条回答
  •  礼貌的吻别
    2021-02-08 18:18

    If your are using gradle this will work for shadow plugin:

    import com.github.jengelman.gradle.plugins.shadow.transformers.*
    
    ...
    
    plugins {
        id 'com.github.johnrengelman.shadow' version '2.0.4'
    }
    
    ...
    
    shadowJar {
        zip64 true
        mergeServiceFiles()
        append 'META-INF/spring.handlers'
        append 'META-INF/spring.schemas'
        append 'META-INF/spring.tooling'
        transform(PropertiesFileTransformer) {
            paths = ['META-INF/spring.factories' ]
            mergeStrategy = "append"
        }
    }
    

    Taken from here: https://github.com/spring-projects/spring-boot/issues/1828#issuecomment-607352468

提交回复
热议问题