戳这里,加关注哦~Spring中的注解大概可以分为两大类:spring的bean容器相关的注解,或者说bean工厂相关的注解;springmvc相关的注解。spring的bean容器相关的注解,先后有:@Required, @Autowired, @PostConstruct, @PreDestory还有Spring3.0开始支持的JSR-330标准javax.inject.*中的注解(@Inject, @Named, @Qualifier, @Provider, @Scope, @Singleton).springmvc相关的注解有:@Controller, @RequestMapping, @RequestParam, @ResponseBody等等。要理解Spring中的注解,先要理解Java中的注解。1. Java中的注解Java中1.5中开始引入注解,我们最熟悉的应该是:@Override, 它的定义如下:/** * Indicates that a method declaration is intended to override a * method declaration in a supertype. If a method is annotated with * this annotation type compilers are required
………………………………