Spring Boot Annotaion
Describe about usability for each annotaion in spring boot
@Bean
@Configuration
@Component
@Primary
// 2 method for create bean
@Bean
public RestTemplate createRestTemplate(){
return new RestTemplate(1000,"rest1");
}
@Bean
@Primary
public RestTemplate createRestTemplate2(){
return new RestTemplate(2000,"rest2");
}
//This service will create resttemplate2
public class Service {
@Autowired
private RestTemplate rest2;
}@ConfigurationProperties
@Builder
@RequiredArgsConstructor
@Data
@Accessor
@AllArgsConstructor
@NotNull
@NotEmpty
@NotBlank
@Valid
@Validated
@Transactional
@JsonIgnore
@JsonIgnoreProperties
Last updated