Project

General

Profile

Actions

Tareas #190

closed

Selene Wrapper - Tareas #189: Create new pattern for JSON services

Create class CustomJacksonJaxbJsonProvider

Added by Jesús Freire almost 7 years ago. Updated almost 7 years ago.

Status:
Cerrada
Priority:
Normal
Assignee:
Target version:
Start date:
07/02/2018
Due date:
07/30/2018
% Done:

100%

Estimated time:
1:00 h
Spent time:
Puntos de historia:
1

Description

Tomee container takes de Johnzon JSON provider to convert beans to/from JSON because it's the default JSON provider.
It's neccesary to add the Jackson JSON provider to make this conversion correctly.
Tomee still take Johnzon as the defautl jSON provider.
So, extend the class JacksonJaxbJsonProvider:

        <dependency>
            <groupId>com.fasterxml.jackson.jaxrs</groupId>
            <artifactId>jackson-jaxrs-json-provider</artifactId>
            <version>2.4.3</version>
        </dependency>

Add the follow annotations:
@Provider
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)

Actions

Also available in: Atom PDF