Spring Annotations

@Repository Annotation in Spring Boot

Spring boot @Repository annotation is a specialization of the @Component to indicate a data repository used for storage, retrieval, and search behavior.

@GetMapping and @PostMapping in Spring Boot (with Examples)

In Spring, @GetMapping maps HTTP GET requests and @PostMapping maps HTTP POST requests to controller methods. Both are shortcuts for @RequestMapping with a fixed HTTP method. See a working Spring Boot REST controller, the @RequestMapping equivalent and the attributes that narrow a mapping.

Spring context:annotation-config vs context:component-scan

Learn the main differences between tags <context:annotation-config> and <context:component-scan> in Spring MVC applications so that when we use them in the future, we will know, what exactly we are doing. 1. The Differences between <context:annotation-config> vs <context:component-scan> The first big difference between both tags is that <context:annotation-config> is used to …

About Us

HowToDoInJava provides tutorials and how-to guides on Java and related technologies.

It also shares the best practices, algorithms & solutions and frequently asked interview questions.