Spring boot : v2.7.4

Hi,

I observe that if I did not add @EnableAspectJAutoProxy, my aspect can still work. So may i confirm if @EnableAspectJAutoProxy is optional?

Comment From: hannah23280

Spring boot : v2.7.4

Hi, I observe that if I did not add @EnableAspectJAutoProxy, my aspect can still work. So may i confirm if @EnableAspectJAutoProxy is optional?

Somehow my experiments seem to point that @EnableAspectJAutoProxy is not really needed due to auto-configuration in spring boot. Is my understanding correct? Does spring boot documentation t mention anything about this?

Comment From: snicoll

You are correct. spring.aop.auto is the only mention of this in the reference guide so we should perhaps add a short section to describe what the auto-config does, in particular the fact we opt-in for CGLIB classes by default.

Comment From: nightswimmings

A thing I always wondered is why is CGLIB the reference, when AspectJ supports proxying internal methods of a class (typical catcher). Or at least that was my mental note when I researched the topic some years ago