Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @POST
- @Path("/config")
- @Consumes(MediaType.APPLICATION_JSON)
- public Response saveConfiguration(String name, MultivaluedMap<String, Object> properties) {
- return Response.ok().build();
- }
- String payload = "{"name":"CRJ001","properties":{"expression":["a + b"],"baseClass":["org.carlspring.strongbox.crontask.test.MyTask"]}}";
- WebTarget resource = client.getClientInstance().target(path);
- Response response = resource.request(MediaType.APPLICATION_JSON).post(Entity.entity(payload, MediaType.APPLICATION_JSON));
- int status = response.getStatus();
- assertEquals("Failed to save!", Response.ok().build().getStatus(), status);
- [[FATAL] Method public javax.ws.rs.core.Response org.abc.rest.ConfigurationRestlet.saveConfiguration(java.lang.String,javax.ws.rs.core.
- MultivaluedMap) on resource class org.abc.rest.ConfigurationRestlet contains multiple parameters with no annotation. Unable to resolve
- the injection source.;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement