1、注解
@Value:
@Component:
@ConfigurationProperties:
@ Controller:处理请求
@RestController:spring4添加,返回json格式数据,不需要指向特定前端页面
@RequestMapping:url映射
@PathVariable:获取url中的数据
@RequestParam:获取请求参数的值
@GetMapping:组合注解
@Min: 验证 number 和 string 对象是否大等于指定的值
@Component:定义Spring管理Bean
@AspectJ风格的切面可以通过@Compenent注解标识其为Spring管理Bean,而@Aspect注解不能被Spring自动识别并注册为Bean,必须通过@Component注解来完成
@ControllerAdvice注解一般处理系统error,拦截出错信息,返回错误提示界面,防止用户看到一堆错误信息