java - spring aspects working without explicit definition in application context -


in project, have aspect defined follows:

@aspect public class uselessaspect {  @around("execution(* com.x.y.uselessclass.*.*(..))") public object logarounduselessclassmethods(proceedingjoinpoint joinpoint) throws throwable {         // following method exist , doing whats desired         return logbeforeandafterthemethod(joinpoint);     } } 

i not have following in application context:

<bean id="uselessaspect" class="com.z.uselessaspect" /> 

my question - why aspect working expected? perception aspect required in spring application context. difference between having aspect in application context , not having aspect in application context?

edit

in applicationcontext.xml, have

<context:spring-configured/> <context:component-scan base-package="com"></context:component-scan> 


Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -