注解

开发中用过的注解,收集。

1. Junit

1.1. @Test

1.2. @AfterAll

1.3. @AfterAll

1.4. @BeforEach

1.5. @AfterEach

1.6. @DisplayName

1.7. @ParameterizedTest

1.8. @SourceValue

1.9. @CsvSource

2. Servlert

2.1. @WebServlet

3. SpringBoot

3.1. @SpringBootApplicaiton

3.2. @RestController

@RequestBOdy+@Controller

3.3. @Component

3.4. @Service

3.5. @Repository

3.6. @AutoWired 和 @Qualifity

3.7. @Reource

4. @RequestMapping

4.1. @GetMapping

4.2. @DeleteMapping

4.3. @PostMapping

4.4. @PutMapping

5. 参数相关

5.1. @RequestParam

5.2. @PathVariable

5.3. @RequestBody

6. Mybatis

08-web实战-java操作数据库

6.1. @Mapper

6.2. @Select

6.3. @MapKey

重要用法

6.4. @Results

6.5. @Result

6.6. @Insert

6.7. @Options

@Options (useGeneratedKeys = true, keyProperty = "id")

6.8. @Delete

6.9. @Update

7. @Transactional

8. yml 属性读取

8.1. @Values

单个属性

8.2. @ConfigurationProperties 和@Component 组合

很多属性用对象封装,指定 prefix

9. 异常处理

9.1. @RestControllerAdvice

9.2. @ExceptionHandler

10. @WebFilter

@WebFilter(urlPatterns = "/*")

11. @ServletComponentScan

12. @Order

HandlerInterceptor 接口实现类,Interceptor 拦截器。

@Order(1)  数字小,优先执行。