JDK comes with annotations |
@Override |
means that the current method overrides the parent class |
@Deprecation |
Indicates that the method is obsolete , There is a horizontal line on the method, and a warning is used |
@SuppviseWarnings |
Indicates closing some warning messages ( notifies the Java compiler to ignore specific compilation warnings ) |
Spring Annotations |
@Autowired |
Spring Automatic Assembly |
@Qualifier ("Javabea") |
Automatic assembly with @Autowired |
@Resource (name= "JavaBean") |
Spring Automatic Assembly , without writing parameters directly assemble the same type of class |
@PostConstruct |
Methods for class initialization |
@PreDestroy |
Methods of class destruction |
@Component |
Table name class is JavaBean |
@Scope ("prototype") |
Specifies the scope of the Bean , prototype to re-instantiate each time |
@Repository |
Same as @Component , often used in data persistence layer |
@Service |
same as @Component , often used in the business Logic Layer |
@Controller |
same as @Component , often used to control the performance layer |
AspectJ Annotations |
@AspectJ |
Declaring slice classes , working with @Component |
@Before |
Front notification (pointcut="")-- tangent expression |
@AfterReturning |
Return notification (pointcut="", returning= "")--( tangent expression , return value variable ) |
@AfterThrowing |
Exception notification (pointcut="", throwing= "")--( tangent expression , exception variable ) |
@After |
Post Notification (pointcut="")-- tangent expression |
Tangent expression |
Execution ( scope return value type full class name . ) Method Name () ) |
@Around |
Surround Notification ( tangent expression ) |
@AspectJ |
Introducing declarations to use in facets |
@Poincut |
Reusing a pointcut expression ( pointcut expression ), when used , notifies the pointcut="method name" |
@Order |
The priority ( number ) of the Slice class, the smaller the number , the higher the priority |