XML

In this blog post, I will share the Spring annotations used to map HTTP requests to specific handler methods. These annotations include @PostMapping, @GetMapping, @PutMapping, and @DeleteMapping. While most Spring Boot applications use the @RequestMapping annotation, which I will also cover in this post, I’ll begin with the newer shortcut annotations that have been available…

Read More Spring Annotations @PostMapping, @GetMapping, @PutMapping and @DeleteMapping

By default, Spring Boot RESTful web service endpoints consume and produce JSON representations. However, it’s possible to enable consuming XML and producing it for your REST API endpoints with minimal effort. This tutorial will guide you through the process of adding XML support to your Spring Boot application, allowing consuming XML and producing representations of…

Read More Consuming XML in Spring Boot REST

This tutorial will teach you how to make your RESTful Spring Boot API endpoint respond with either XML or JSON representation. The client application can request our API endpoint to respond with JSON or XML by including a special HTTP Header called Accept. As a value, the Accept HTTP Header will have either application/json or application/xml. …

Read More Return XML or JSON in Spring Boot Web Service