spring-jersey

RESTeasy and the @MultipartForm , server and client

大憨熊 提交于 2019-12-24 22:28:34
问题 Walking through the RESTEasy Guide 4.4.0-final from jboss. Having the examples to guide be as well. Wanting to create a small service where you post a binary-file with some metadata. In this particular case I would like to post a file + 'the owner of that file'. In my first effort I am using the following construct (1st-attempt-server). @POST @Consumes(MediaType.MULTIPART_FORM_DATA) public Response uploadFile(@FormDataParam("file") InputStream is, @FormDataParam("file")

Jersey factory tries to create @Context variable twice

我的未来我决定 提交于 2019-12-11 04:49:52
问题 I have a problem with Jersey 2.26 and Spring Boot 2 . I added a factory to inject @Context variable into methods, but it does it twice, first before the method and then again after the method: @GET @Path("/user-entitlements") public Set<String> getUserEntitlements(@Context User user) { return service.getUserEntitlements(user); } I have a factory that creates those users: public class UserFactory implements Factory<User> { private final User user; @Inject public UserFactory(HttpServletRequest

Adding @Provider when using Spring with jersey

淺唱寂寞╮ 提交于 2019-12-08 13:37:56
问题 We are working mainly with Spring application integrating jersey , we can add @Provider for Exception Providers and Filters (as ContainerRequestFilter ) Can adding @Provider cause problems while using Spring's initialization AnnotationConfigWebApplicationContext or it will be simply ignored? I didn't find any @Provider in Spring with Jersey tutorial of @PaulSamsotha I understand @Provider meaning, Currently we aren't using @Provider (and maybe have no reason to) Marks an implementation of an