RESTful strings in Java

I am looking for a Java library that evaluates REST-style URLs. Sort of:

public Result evaluate(String url, String pattern);

The sample will look something like this:

/ users / {user ID} / photos / {PHOTOID} .html

The result should include:

  • if the url matches the pattern
  • actual values ​​of the URL variables {userId} and {photoId}

Can anyone help please?

+5
source share
3 answers

By "rating" do you mean some kind of unification or pattern matching, by which a string is urlmatched to a string pattern, matching placeholders in a pattern with the corresponding substrings in the URL?

, Template class . , Template#parse(String, Map<String, Object>). , , .

+1

, , JBoss RestEasy http://jboss.org/resteasy . , ,

+1
+1
source

All Articles