Can't find @FormDataParam in Jersey 2.17

前端 未结 2 1722
悲&欢浪女
悲&欢浪女 2021-01-01 12:38

I\'m quite new to web services so I\'ve started with basic examples. This one relates to file upload. I\'m using latest (2.17) version of Jersey bundle for non-maven develop

相关标签:
2条回答
  • 2021-01-01 13:09

    The bundle only includes the the core modules (and their dependencies). Unfortunately, Multipart is not part of the core. You'll need this dependency (Maven) also

    <dependency>
        <groupId>org.glassfish.jersey.media</groupId>
        <artifactId>jersey-media-multipart</artifactId>
        <version>2.17</version>
    </dependency
    

    If you're not using Maven, from what I can tell, this artifact only has one other dependency (that is not already included in the bundle), and it's mimepull-1.9.3.

    You can download both artifacts below

    • jersey-media-multipart
    • mimepull-1.9.3
    0 讨论(0)
  • 2021-01-01 13:09

    You have to download the below dependency from https://mvnrepository.com/ maven repositoryMaven Repository

    <!-- https://mvnrepository.com/artifact/org.glassfish.jersey.media/jersey-media-multipart -->
    <dependency>
        <groupId>org.glassfish.jersey.media</groupId>
        <artifactId>jersey-media-multipart</artifactId>
        <version>2.31</version>
    </dependency>
    

    It is not a part of spring-boot-starter-jersey

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jersey</artifactId>
        </dependency>
    
    0 讨论(0)
提交回复
热议问题