Commit 467f6307 by Patryk Czarnik

Przykład parametru Query

parent c57e7f94
package hello;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.QueryParam;
@Path("/parametry")
public class Parametry {
@Path("/witaj")
@GET
@Produces("text/plain")
// w Springu byłoby tak: @GetMapping(path="/witaj", produces="text/plain")
public String witaj(@QueryParam("imie") String imie) {
return "Witaj " + imie;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment