Home » Tag Archives: HATEOAS

Tag Archives: HATEOAS

Testing a HATEOAS service

spring-interview-questions-answers

This post is a follow up post to a few that I have written recently relating to writing a HATEOAS service and handling exceptions with Spring (Applying HATEOAS to a REST API with Spring Boot and Global exception handling with @ControllerAdvice). Now that we have looked through setting up a service and how to add some error handling via controller ...

Read More »

Global exception handling with @ControllerAdvice

spring-interview-questions-answers

@ControllerAdvice is a annotation provided by Spring allowing you to write global code that can be applied to a wide range of controllers, varying from all controllers to a chosen package or even a specific annotation. In this brief tutorial we will focus on handling exceptions using @ControllerAdvice and @ExceptionHandler (@InitBinder and @ModalAttribute can also be used with @ControllerAdvice). I will be ...

Read More »

Applying HATEOAS to a REST API with Spring Boot

spring-interview-questions-answers

HATEOAS is an acronym for Hypermedia As The Engine Of Application State. Even after expanding that for you it still might not mean a lot. HATEOAS is an extra level upon REST and is used to present information about the REST API to the client, allowing for a better understanding of the API without the need to bring up the ...

Read More »

Don’t Hate the HATEOAS Part Deux: Springtime for HATEOAS

java-interview-questions-answers

In the much belated conclusion to my series on HATEOAS, we will be diving into how to implement HATEOAS using Spring-Data-REST and Spring-HATEOAS. It is springtime for HATEOAS! I put together a functioning project that will demonstrate the code examples I have below as well as a few other features. The project can be found here: https://github.com/in-the-keyhole/hateoas-demo-II. JDK 8 and Maven are ...

Read More »

Don’t Hate The HATEOAS

java-interview-questions-answers

Or How I Learned to Stop Worrying and Love the HATEOAS REST has become the defacto, or at least vogue, solution to implementing web services. This is understandable because REST offers a level of self-documentation in its utilization of the HTTP specification. It’s durable, scalable, and offers several other desirable characteristics. However many so-called RESTful services don’t implement HATEOAS (Hypermedia ...

Read More »

Building a HATEOAS API with JAX-RS and Spring

In my previous blog post I showed how easy Jersey can be configured with Spring Boot. My exploration on Spring Boot and Jersey did not end and I investigated the possibility of using Spring HATEOAS along with Jersey in Spring Boot application. Spring HATEOS allows creating REST representations that follow the HATEOAS principle and (as of writing this article) has ...

Read More »

Consuming Spring-hateoas Rest service using Spring RestTemplate and Super type tokens

spring-interview-questions-answers

Spring-hateoas provides an excellent way for applications to create REST based services which follow the HATEOAS principle. My objective here is not to show how to create the service itself, but to demonstrate how to write a client to the service. The sample service that I am going to use is the ” the-spring-rest-stack” written by Josh Long( @starbuxman). The ...

Read More »

Want to take your Java skills to the next level?

Grab our programming books for FREE!

Here are some of the eBooks you will get:

  • Spring Interview QnA
  • Multithreading & Concurrency QnA
  • JPA Minibook
  • JVM Troubleshooting Guide
  • Advanced Java
  • Java Interview QnA
  • Java Design Patterns