Java 注解
2024-01-16 18:13:28   3  举报             
     
         
 AI智能生成
  Java 注解相关
    作者其他创作
 大纲/内容
  易混淆注解解释    
     1.@Component和@Bean 区别    
     1.@Component 作用于类,@Bean作用于方法  
     2.@Componet通常是通过路径扫描类自动侦....  
     3.@Bean注解比@Conponent注解自定义性更强....  
     2.@Autowire和@Resource 区别  
     3.类声明为Spring的Bean的注解  
     4.@Configuration 注解  
     5.@ControllerAdvice 注解  
     6.Component、@Repository、@Service 区别  
     其他    
     @EnableScheduling  
     @Scheduled  
     @Async  
     JPA 注解    
     @Entity 注解  
     @MappedSuperClass 注解  
     @NoRepositoryBean 注解  
     @Column 注解  
     @Id 注解  
     @GeneratedValue 注解  
     @SequenceGeneretor 注解  
     @Table  
     @Basic  
     @Transient  
     @Enumerated
  
     @Temporal
  
     @DynamicInsert
  
     @DynamicUpdate  
     @Access  
     子主题  
     子主题  
     Spring Web MVC 注解    
     @RequestMapping 注解  
     @RequestBody 注解  
     @Valid 注解  
     @GetMapping 注解  
     @PostMapping 注解  
     @PutMapping 注解  
     @DeleteMapping 注解  
     @PatchMapping 注解  
     @ControllerAdvice 注解  
     @ResponseBody 注解  
     @ExceptionHandler 注解  
     @ResponseStatus 注解  
     @PathVariable 注解  
     @RequestParam 注解  
     @Controller 注解  
     @RestController 注解  
     @ModelAttribute 注解  
     @CrossOrigin 注解  
     @InitBinder 注解  
     @CookieValue  
     @RestControllerAdvice  
     @SessionAttribute  
     @SessionAttributes  
     Spring Bean 注解    
     @ComponentScan 注解  
     @Component 注解    
     @Controller  
     @Service  
     @Repository  
     这三个注解的作用和 @Component 的作用一样,都是用来创建对象。  
     @Service 注解  
     @Repository 注解  
     @Lazy  
     @Transactional  
     @Scope  
     Spring DI 注解    
     @DependsOn 注解  
     Bean Scops 注解    
     @Bean 注解    
     init Method  
     destroy Method  
     @Scops 注解  
     容器配置注解    
     @Autowired 注解  
     @Primary 注解  
     @PostConstruct和@PreDestory 注解  
     @Qualifier 注解  
     @Autowired 和@Qualifier  
     Spring Boot 注解    
     @SpringBootApplication 注解  
     @EnableAutoConfiguration 注解  
     @ConditionalOnClass和@ConditionalOnMissingClass 注解  
     @ConditionalOnBean和@ConditionalOnMissingBean 注解  
     @ConditionalOnProperty 注解  
     @ConditionalOnResource 注解  
     @ConditionalOnWebApplication和@ConditionalOnNotWebApplication注解  
     @ConditionalExpression 注解  
     @Conditional 注解  
     全局异常处理    
     @ControllerAdvice 注解  
     @ExceptionHandler 注解  
     Lombok 注解    
     @Data  
     @Value  
     @NonNull  
     @Cleanup  
     @Getter和@Setter  
     @ToString  
     @EqualsAdnHashCode  
     @NoArgsConstructor/@RequiredArgsConstructor/@AllArgsConstructor  
     @SneakyThrows  
     @Synchornized  
     @Log  
    
 
 
 
 
  0 条评论
 下一页
  
   
  
  
  
  
  
  
  
  
  
  
 