SpringBoot_Annotations_Explained
SpringBoot_Annotations_Explained
@SpringBootApplication
@RestController
@Controller
@RequestMapping
@PathVariable
@RequestBody
@ResponseBody
Indicates that the return value of a method should be used as the response body.
Spring Boot Annotations - Explained
@Autowired
@Service
@Repository
@Entity
@Id
@GeneratedValue
@Configuration
Indicates that the class can be used by the Spring IoC container as a source of bean definitions.
@Bean
@Component
Spring Boot Annotations - Explained
Indicates that an annotated class is a component. Such classes are considered as candidates for
auto-detection.
@ComponentScan
@EnableAutoConfiguration
Tells Spring Boot to start adding beans based on classpath settings, other beans, and property settings.
@CrossOrigin
A container object which may or may not contain a non-null value. Helps avoid null pointer exceptions.