Skip to content
This repository was archived by the owner on Apr 2, 2026. It is now read-only.

Latest commit

 

History

History
73 lines (42 loc) · 1.88 KB

File metadata and controls

73 lines (42 loc) · 1.88 KB

🏷️ Spring Boot Annotations

GitHub stars GitHub forks

Essential Spring Boot Annotations

Quick reference for REST, DI, and data annotations


🎯 About

Concise showcase of essential Spring Boot annotations. Configure REST endpoints, dependency injection, and data handling effectively.

📚 Key Annotations

Category Annotations
Core @SpringBootApplication, @Component, @Bean
REST @RestController, @GetMapping, @PostMapping
DI @Autowired, @Qualifier, @Value
Data @Entity, @Repository, @Transactional
Config @Configuration, @PropertySource

💻 Examples

@RestController
@RequestMapping("/api")
public class UserController {
    
    @Autowired
    private UserService userService;
    
    @GetMapping("/users")
    public List<User> getAll() {
        return userService.findAll();
    }
    
    @PostMapping("/users")
    public User create(@RequestBody User user) {
        return userService.save(user);
    }
}

🛠️ Technologies

Spring Boot | REST API | JPA | Maven

📬 Contact

LinkedIn Gmail


Keywords: Spring-Boot Annotations REST-API Autowired Component Controller Repository