Is there a way to programmatically add register methods to a REST web service without using annotations?
Is there any REST framework that supports programmatically addition of methods? I don't want to use annotations. I want to do开发者_开发知识库 something like this:
RestServer server = new RestServer("http://localhost:5678");
server.registerOperation("/ping","com.mypackage.service.Ping","methodName","GET");
server.registerOperation("/add/{number}/{number}","com.mypackage.service.Math","sum","POST");
server.start();
There is! It's called compojure, but you're going to have to learn clojure first.
精彩评论