注解主要是做什么的?
感觉annotation就是给你需要的类、field,method之类的加上元信息,这样你方便你自己parse。个人比较喜欢把custom annotation跟Spring的@Component一起使用,这样在spring bootstrap的时候可以通过applicationContext.getBeansWithAnnotation(YourCustomAnnontation.class);
直接拿需要的annotation class(Bean),很方便, 可以做很多事情。