开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜