java - how to write BeforeAdvice for Thread Class in a struts application using Spring AOP? -


i having struts application using spring aop , ioc via applicationcontext.xml loading through classpathxmlapplicationcontext().

now having mailer.java extends thread below

public class mailer extends thread  {     public static void sendmessage(string to, string cc, string from, string subject, string message) throws messagingexception     {       //sending e-mails, returning nothing     } } 

in above class sendmessage() static method , called in sucha way

mailer.sendmessage()  

in service classes of application.

now want create methodbeforeadvice sendmessage() method. how can that?

spring aop proxy based - therefore need use aspectj compiler/weaver


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -