@Controller:
@RestController:
@Component:
@Repository:
@Service:
@ResponseBody:
@RequestMapping:
@Autowired:
@PathVariable:
@RequestParam:
@RequestHeader:
@CookieValue:
@Configuration:声明一个类为配置类,等同于在xml中配置一个bean
@ComponentScan:自动扫描名下所有的Service,Repository,Component,Controller等注解,注册bean
@Bean:声明在方法上,表示该方法会返回一个bean