Ticket #35 (new enhancement)

Opened 7 months ago

JAX-RS: allow to use classes defined in Spring as resource/provider classes

Reported by: bruno Assigned to: bruno
Priority: minor Milestone:
Component: modules/kauri-routing Version: trunk
Keywords: Cc:

Description

Currently for JAX-RS classes, only autowiring is supported to get dependencies injected into them.

There might be cases where more expressive Spring capabilities can be useful (examples?) and hence the possibility to refer to existing Spring beans could be useful.

One implementation difficulty is that JAX-RS needs a set of classes as input, so if the class cannot be used as key (but rather the spring bean), some trick will need to be used (generate classes?).

Also an implementation should check that the Spring classes are prototype-scoped, or else it should be properly documented that the same instance will be used for handling multiple requests concurrently (i.e. to avoid conflicts with JAX-RS injection).