/Tag: REST

REST HATEOAS with Spring

REST HATEOAS with Spring The Richardson maturity model breaks the REST architectural style into various levels of maturity. Level zero describes a system that uses HTTP as a transport mechanism only (also known as URI tunnelling). A single URI and HTTP verb is typically used for all interactions with POX (plain old XML) being posted over the wire. Old school SOAP-RPC is a good level zero example. Level one describes a system that builds on level zero by introducing the notion of resources. Resources typically represent some business entity and are usually described using nouns. Each resource is addressed via a unique URI and a single [...]

By |2019-02-07T08:02:28+01:00July 18th, 2017|REST, Spring Boot|0 Comments

REST Endpoint Testing With MockMvc

REST Endpoint Testing With MockMvc In this post I'm going to show you how to test a Spring MVC Rest endpoint without deploying your application to a server. In the past, full integration tests were the only meaningful way to test a Spring REST endpoint. This involved spinning up a test server like Tomcat or Jetty, deploying the application, calling the test endpoint, running some assertions and then terminating the server. While this is an effective way to test an endpoint, it isn't particularly fast. We're forced to wait while the entire application is stood up, just to test a single endpoint. An alternative approach [...]

By |2019-02-11T07:31:42+01:00May 25th, 2017|REST, Spring Boot, Testing|0 Comments

Spring REST Tutorial

Spring REST Tutorial I've just written an updated tutorial for building a RESTful services with Spring Boot. Have a look here. In this post I’ll show you how to implement a RESTful web service using the Spring framework. REST support was introduced as part of Spring 3 and is built on top of the existing Spring MVC stack, so anyone that has worked with Spring MVC in the past should find the REST support very easy to grasp. I’ll provide a step by step guide so even if you’re not familiar with Spring MVC you should be able get a RESTful service up and running [...]

By |2019-02-21T16:50:59+01:00August 19th, 2012|REST, Spring|53 Comments