Spring boot application with apache axis

前端 未结 1 1121
灰色年华
灰色年华 2021-02-04 18:18

I am trying to run a spring boot jar which has axis2 dependencies in it. I am using spring boot maven plugin to build the jar (with dependencies). When I try to run my jar, I ge

1条回答
  •  闹比i
    闹比i (楼主)
    2021-02-04 18:35

    It looks like Axis can't cope with being run from a jar that's nested within another jar. It works fine in Eclipse as the Axis jar is available directly on the filesystem rather than being nested inside your Spring Boot application's jar file.

    You can configure your application's fat jar file so that Spring Boot knows to unpack the Axis jar into a temporary location when it's run. If you're using Maven:

    
        
            
                org.springframework.boot
                spring-boot-maven-plugin
                
                    
                        
                            org.apache.axis2
                            axis2
                        
                    
                
            
        
    
    

    And if you're using Gradle:

    springBoot  {
        requiresUnpack = ['org.apache.axis2:axis2']
    }
    

    See the Spring Boot documentation for some further details.

    0 讨论(0)
提交回复
热议问题