[jboss-jira] [JBoss JIRA] (WFLY-8136) Allow JAX-RS annotations in CDI @Stereotype
Brian Stansberry (Jira)
issues at jboss.org
Fri Jan 17 14:21:02 EST 2020
[ https://issues.redhat.com/browse/WFLY-8136?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brian Stansberry updated WFLY-8136:
-----------------------------------
Fix Version/s: 20.0.0.Beta1
(was: 19.0.0.Beta1)
> Allow JAX-RS annotations in CDI @Stereotype
> -------------------------------------------
>
> Key: WFLY-8136
> URL: https://issues.redhat.com/browse/WFLY-8136
> Project: WildFly
> Issue Type: Feature Request
> Components: CDI / Weld, REST
> Affects Versions: 9.0.1.Final, 15.0.0.Final
> Environment: Windows 7, JDK 1.8.0_60
> Reporter: Andreas Klemp
> Assignee: Martin Stefanko
> Priority: Major
> Fix For: 20.0.0.Beta1
>
>
> A simple JAX-RS REST service can be annotated with @Produces to define the resulting mime-type. However, it is not working anymore, when the annotation is moved to a stereotype. The default application/octet-stream is used.
> {code}
> @Stereotype
> @Produces(MediaType.APPLICATION_JSON)
> @Target(ElementType.TYPE)
> @Retention(RetentionPolicy.RUNTIME)
> public @interface RestService {
> }
> @Path("/some")
> @RestService
> public class SomeRestService {
> @GET
> @Path("/")
> public Response getSome() {
> return Response.ok().entity("{\"x\" : 42, \"y\" : \"foo\"}").build();
> }
> }
> {code}
> Using the following dependencies in Gradle project.
> {noformat}
> providedCompile(
> [group: 'javax.enterprise', name: 'cdi-api', version: '1.2'],
> [group: 'org.jboss.spec.javax.ws.rs', name: 'jboss-jaxrs-api_2.0_spec', version: '1.0.0.Final'],
> [group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.7.4']
> )
> {noformat}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
More information about the jboss-jira
mailing list