Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Accès rapide :






Vous êtes un professionnel et vous avez besoin d'une formation ?

Programmation Java
Les compléments


Voir le programme détaillé
ESN Inovelya : Nous recrutons
<h1>AOP (Aspect-Oriented Programming) - Mise en oeuvre via l'approche par annotations</h1> <p>Il ne reste plus qu'à activer AspectJ dans votre configuration : @Configuration @ComponentScan( value = { "fr.koor.demo_aop" } ) @EnableAspectJAutoProxy // Mandatory !!! public class App { public static void main(String[] args) { try (AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext( App.class )) { BusinessBean bean = context.getBean( BusinessBean.class, "businessBean"); bean.doSomething("essai"); System.out.println( bean.getClass().getName() ); } } }</p> Diapositive précédente Diapositive suivante