Commit 49d249bd authored by Stephane Nicoll's avatar Stephane Nicoll

Disable Aop auto-config if aspectjweaver is not present

This commit adds an additional class check to AopAutoConfiguration as
it is main role is to configure `@EnableAspectJAutoProxy` which won't
work properly if `aspectjweaver` is not present.

Closes gh-9880
parent edee342d
......@@ -18,6 +18,7 @@ package org.springframework.boot.autoconfigure.aop;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.reflect.Advice;
import org.aspectj.weaver.AnnotatedElement;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
......@@ -39,7 +40,7 @@ import org.springframework.context.annotation.EnableAspectJAutoProxy;
* @see EnableAspectJAutoProxy
*/
@Configuration
@ConditionalOnClass({ EnableAspectJAutoProxy.class, Aspect.class, Advice.class })
@ConditionalOnClass({ EnableAspectJAutoProxy.class, Aspect.class, Advice.class, AnnotatedElement.class })
@ConditionalOnProperty(prefix = "spring.aop", name = "auto", havingValue = "true", matchIfMissing = true)
public class AopAutoConfiguration {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment