wildfly-9

@Produces collection in JAXRS / RestEasy

£可爱£侵袭症+ 提交于 2019-11-29 15:13:57
I found some strange behaviour that I cannot understand. I have tested 4 similar examples: 1 @GET @Produces(MediaType.APPLICATION_JSON) public Response produce() { List<Book> books = Arrays .asList(new Book[] { new Book("aaa", "AAA", "12345"), new Book("bbb", "BBB", "09876") }); return Response.ok(books).build(); } 2 @GET @Produces(MediaType.APPLICATION_JSON) public List<Book> produce() { List<Book> books = Arrays .asList(new Book[] { new Book("aaa", "AAA", "12345"), new Book("bbb", "BBB", "09876") }); return books; } 3 @GET @Produces(MediaType.APPLICATION_XML) public List<Book> produce() {

@Produces collection in JAXRS / RestEasy

99封情书 提交于 2019-11-28 08:23:48
问题 I found some strange behaviour that I cannot understand. I have tested 4 similar examples: 1 @GET @Produces(MediaType.APPLICATION_JSON) public Response produce() { List<Book> books = Arrays .asList(new Book[] { new Book("aaa", "AAA", "12345"), new Book("bbb", "BBB", "09876") }); return Response.ok(books).build(); } 2 @GET @Produces(MediaType.APPLICATION_JSON) public List<Book> produce() { List<Book> books = Arrays .asList(new Book[] { new Book("aaa", "AAA", "12345"), new Book("bbb", "BBB",

Wildfly 9 - How do I exclude Jackson

耗尽温柔 提交于 2019-11-26 21:51:04
问题 I'm running into a Jackson serialization issue with null values in maps. Apparently this is a known bug in the Jackson version used by Wildfly 9 (https://issues.jboss.org/browse/WFLY-4906). I'd like to use the current version of Jackson; however, I'm having trouble excluding the version used by Wildfly. I tried excluding the module in jboss-deployment-structure.xml but the exclusion is not working. Any idea how I can get this to work? 回答1: I just ran into this issue myself. After upgrading a