MULTIPART_FORM_DATA: No injection source found for a parameter of type public javax.ws.rs.core.Response

后端 未结 8 1669
难免孤独
难免孤独 2020-11-22 08:52

I am using Jersey based restful Service implementation strategy to build a service which will be used to upload files. My service class name is : UploadFileService.java (See

8条回答
  •  佛祖请我去吃肉
    2020-11-22 09:22

    I had the same problem when I tried to upload the file. I spent a lot of time until I found a solution to the problem.

    1.If you changed version of your JARs files you may have a version conflicts!

    Clean up your artifacts/libs and rebuild project.

    2.You need to register your UploadFileService class too:

    register(MultiPartFeature.class);
    register(UploadFileService.class);
    

    Hope it will help someone and save your time.

提交回复
热议问题