Skip to content

This repository, SpringBoot Annotations, is a concise showcase of essential Spring Boot annotations. Learn to configure REST endpoints, perform dependency injection, and use services and repositories effectively. Level up your Spring Boot skills with this handy reference.

Notifications You must be signed in to change notification settings

Shubh2-0/SpringBoot_Annotations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏷️ 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

About

This repository, SpringBoot Annotations, is a concise showcase of essential Spring Boot annotations. Learn to configure REST endpoints, perform dependency injection, and use services and repositories effectively. Level up your Spring Boot skills with this handy reference.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages