Skip to content
Advertisement

Tag: rest

KeyCloak – Create Realms/Users/Groups Programmatically?

We’ve decided to move to KeyCloak for our identity and access management solution, rather than implement it entirely within our Java EE web app. We’re creating a multi-tenant solution, and would prefer to create security realms/users/groups programmatically through our workflow, rather than leveraging KeyCloak’s self-registration functionality or web UI so that we can do things like grab credit card details

How to get List from Object in Spring RestTemplate

How to get List from Object? Below you can find my code: Actually object variable is a List of Objects(Strings) and I need to get all these Strings. If I print it out System.out.println(object.toString()); it looks like that: I need to get List of these Strings to dynamic use it. Could you please help? Answer Try this out. This should

Turn off ssl certificate validation for JiraRestClient

I’m trying to connect to my Jira via the atlassian rest api java framework: But this causes a errors: javax.net.ssl.SSLHandshakeException: General SSLEngine problem PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target I think this happens because I use a self-signed certificate for my Jira. Is there a way to turn of certificate validation for

Spring RestTemplate getForObject getting 404

I’m trying to make a get request to an Api Rest but I’m always getting 404, nevertheless if try copying queryUrl in a browser or postMan it works perfectly. restTemplate.getForObject(queryUrl, entity ,Integer.class); I’ve also tried this: HttpHeaders httpHeaders = new HttpHeaders(); httpHeaders.setContentType(MediaType.APPLICATION_JSON); HttpEntity entity = new HttpEntity(httpHeaders); log.debug(“request headers: ” + entity.getHeaders()); ResponseEntity response = restTemplate.exchange(queryUrl, HttpMethod.GET, entity, String.class); But

(Date) may expose internal representation by storing an externally mutable object into CategoryModel.createdDate

While working on model class i face an following warning :– My model Class Description of the warning:– Returning a reference to a mutable object value stored in one of the object’s fields exposes the internal representation of the object. If instances are accessed by untrusted code, and unchecked changes to the mutable object would compromise security or other important

Spring REST partial update with @PATCH method

I’m trying to implement a partial update of the Manager entity based in the following: Entity SaveManager method in Controller Save object manager in Dao impl. When I save the object the username and password has changed correctly but the others values are empty. So what I need to do is update the username and password and keep all the

How do I filter data in a restful way using Spring?

As the title says. I basically would love to do requests like Is there any ready spring way of achieving such? Something akin to the Page/Pageable mechanism would be great. If there is none I think I could implement it using Hibernate Criteria Queries & Argument Re-solvers. Basically allowing me to write my controllers like A custom Argument resolver would

Advertisement