Programmatically create REST Service

I’m trying to build a REST service but the service should not be “static” but dynamically/programmatically created. I’m already aware how to create a REST service with Spring and JAX-RS but do not know how to use it dynamically.

My intention is to create annotations to do some markup on the source code and then use this markup to generate a REST service from it (during launch of the application). The service does not need to change during runtime.

Is it possible to use the possibilities of Spring or JAX-RS during runtime or do I have to completely start from the beginning for example using servlets?

Do you have a suggestion on how to solve the problem. Libraries/Frameworks like Spring or JAX-RS would be prefered.


Source: java

Leave a Reply