Spring @RequestMapping New Shortcut Annotations 1. Overview Spring 4.3. introduced some very cool method-level composed annotations to smooth out the handling @RequestMapping in typical Spring MVC projects. In this article, we will learn how to use them in an efficient way. 2. New Annotations Typically, if we want to implement… Continue Reading spring-new-requestmapping-shortcuts

Spring’s RequestBody and ResponseBody Annotations 1. Introduction In this quick article, we provide a concise overview of the Spring @RequestBody and @ResponseBody annotations. Further reading: Guide to Spring Handler Mappings The article explains how HandlerMapping implementation resolve URL to a particular Handler. Read more → Quick Guide to Spring Controllers… Continue Reading spring-request-response-body

Using Spring ResponseEntity to Manipulate the HTTP Response 1. Introduction Using Spring, we usually have many ways to achieve the same goal, including fine-tuning HTTP responses. In this short tutorial, we’ll see how to set the body, status, and headers of an HTTP response using ResponseEntity. Further reading: Getting and… Continue Reading spring-response-entity

Template Engines for Spring 1. Overview The Spring web framework is built around the MVC (Model-View-Controller) pattern, which makes it easier to separate concerns in an application. This allows for the possibility to use different view technologies, from the well established JSP technology to a variety of template engines. In… Continue Reading spring-template-engines

Spring MVC and the @ModelAttribute Annotation 1. Overview One of the most important Spring-MVC annotations is the @ModelAttribute annotation. The @ModelAttribute is an annotation that binds a method parameter or method return value to a named model attribute and then exposes it to a web view. In the following example,… Continue Reading spring-mvc-and-the-modelattribute-annotation