AspectJ weaving yog dab tsi?
AspectJ weaving yog dab tsi?

Video: AspectJ weaving yog dab tsi?

Video: AspectJ weaving yog dab tsi?
Video: ScalaIO - Phillipe Prados, François-Xavier Bonnet - Auditez vos architectures réactives ! 2024, Kaum ib hlis
Anonim

AspectJ cia cov programmers txhais cov kev tsim tshwj xeeb hu ua yam. Ib tug nam yog ib tug central unit AspectJ . Nws muaj cov cai uas qhia txog qhov xaws txoj cai hla hla.

Ib yam li ntawd, AspectJ siv rau dab tsi?

kuv paub AspectJ tuaj yeem yog / yog siv rau Kev sau npe. Qee zaum nws yog siv rau Kev tswj kev lag luam - feem ntau yog siv nrog cov lus piav qhia. AspectJ tuaj yeem yog siv rau txhim kho cov chav kawm nrog (code-generated) txoj kev, zoo li Spring Roo ua.

Ib yam li ntawd, code weaving yog dab tsi? Khaub ncaws hais txog cov txheej txheem ntawm kev txhaj tshuaj ua haujlwm rau hauv ib qho kev pab cuam uas twb muaj lawm. Qhov no tuaj yeem ua tiav qhov kev xav ntawm ntau qib: Source code weaving yuav txhaj qhov chaw code kab ua ntej lub code yog muab tso ua ke. NET) ntxiv cov code raws li IL cov lus qhia hauv lub rooj sib txoos.

Kuj paub, dab tsi yog weaving hauv Java?

Txog Khaub ncaws . Khaub ncaws yog ib tug txheej txheem ntawm manipulating byte-code ntawm compiled Java chav kawm. EclipseLink JPA tus kws kho mob ua haujlwm tsis tu ncua siv xaws txhawm rau txhim kho JPA cov chaw thiab Plain Old Java Object (POJO) cov chav kawm rau tej yam xws li tub nkeeg thauj khoom, hloov kev taug qab, nqa pab pawg, thiab kev ua kom zoo rau sab hauv.

AspectJ caij nplooj ntoos hlav yog dab tsi?

@ AspectJ hais txog ib hom kev tshaj tawm yam xws li cov chav kawm Java ib txwm sau nrog cov lus piav qhia. Cov @ AspectJ style tau qhia los ntawm AspectJ qhov project raws li ib feem ntawm lub AspectJ 5 tso. Caij nplooj ntoos hlav txhais tib annotations li AspectJ 5, siv lub tsev qiv ntawv muab los ntawm AspectJ rau pointcut parsing thiab txuam.

Pom zoo: