REST

@PreAuthorize annotation – hasPermission example in Spring Security

Introduction In this tutorial I will show you an example on @PreAuthorize annotation – hasPermission example in Spring Security. The most useful annotation @PreAuthorize, which decides whether a method can actually be invoked or not based on user’s role and permission. hasRole() method returns true if the current principal has the specified role and hasPermission() […]

@PreAuthorize annotation – hasRole example in Spring Security

Introduction In this tutorial I will show you an example on @PreAuthorize annotation – hasRole example in Spring Security. @PreAuthorize is the most useful annotation that decides whether a method can actually be invoked or not based on user’s role. hasRole() method returns true if the current principal has the specified role. By default if […]

Webservice feature – Language independent

This tutorial will show you an example on how to test one of the features of webservice called language independence. Webservice is a technology by which two or more remote web applications interact with each other over network/internet. It can be implemented using Java, .net, PHP etc. Please go through the REST webservice created using […]

Send data to remote REST web application using Mule ESB

In this tutorial I am going to show you how to send data from Mule application to remote web application which is basically a REST webservice application. Prerequisites Eclipse, JDK 1.8, JAX-RS jars 2.23.2 Have maven installed and configured JAX-RS dependencies in pom.xml For this tutorial we will create a web maven project in Eclipse. […]

Upload file using REST webservice

In this tutorial I am going to show you how we can upload file using REST or RESTful web service. The most important concept in REST is resources, which are identified by global IDs — typically using URIs. Client applications use HTTP methods (GET/ POST/ PUT/ DELETE) to manipulate the resource or collection of resources. […]

Download file using REST webservice

In this tutorial I am going to show you how we can download file using REST or RESTful web service. The most important concept in REST is resources, which are identified by global IDs — typically using URIs. Client applications use HTTP methods (GET/ POST/ PUT/ DELETE) to manipulate the resource or collection of resources. […]

REST Webservice Authentication

In this tutorial I am going to show you how we can authenticate the REST webservice using sending credential information in Cookie. The most important concept in REST is resources, which are identified by global IDs — typically using URIs. Client applications use HTTP methods (GET/ POST/ PUT/ DELETE) to manipulate the resource or collection […]

Convert List, Map to JSON in REST Response using Jersey

Introduction In this post we will see how to convert List, Map to JSON in REST Response using Jersey API. We will create three separate REST methods to convert List to JSOn, Map to JSON and List of Map to JSON string. We will annotate the REST resource class with @Path for having the base […]

Scroll to top