...
Fabric3 supports native JAX-RS annotations for binding a component service as and an endpoint:
Code Block | ||
---|---|---|
| ||
@Path("/") @Consumes(MediaType.TEXT_PLAIN) @Produces(MediaType.TEXT_PLAIN) @Component public class CalculatorServiceImpl implements CalculatorService { @Reference protected AddService addService; @Reference protected SubtractService subtractService; @Reference protected MultiplyService multiplyService; @Reference protected DivideService divideService; @GET @Path("/{formula}") public String calculate(@PathParam("formula") String formula) { // ... } } |
...