title: Error BasicErrorController due annotation @EnableAspectJAutoProxy in Spring Boot 2.3.6
body: <p>I'm doing migration small own library from java 8 and Spring Boot 1.5.x to java 11 and Spring Boot 2.3.x.
  I have some tests in code. And when I run them in java 8, all is fine, all tests are passed.
  But when I migrated to Java 11 and SB 2.3.x I got an error. This is log:</p>
  <pre class="lang-none prettyprint-override"><code>[INFO] -------------------&lt; com.alexshuvaev.libs:log-aspects-library &gt;-------------------
  [INFO] Building log-aspects-library 1.0-SNAPSHOT                          [5/5]
  [INFO] --------------------------------[ jar ]---------------------------------
  [INFO] 
  [INFO] --- jacoco-maven-plugin:0.8.6:prepare-agent (default) @ log-aspects-library ---
  [INFO] argLine set to -javaagent:C:\\Users\\Aleksandr_Shuvaev\\.m2\\repository\\org\\jacoco\\org.jacoco.agent\\0.8.6\\org.jacoco.agent-0.8.6-runtime.jar=destfile=D:\\projects\\alexshuvaev\\foraudit\\log-common\\log-aspects-library\\target\\jacoco.exec
  [INFO] 
  [INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ log-aspects-library ---
  [INFO] Using 'UTF-8' encoding to copy filtered resources.
  [INFO] skip non existing resourceDirectory D:\projects\alexshuvaev\foraudit\log-common\log-aspects-library\src\main\resources
  [INFO] 
  [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ log-aspects-library ---
  [INFO] Changes detected - recompiling the module!
  [INFO] Compiling 11 source files to D:\projects\alexshuvaev\foraudit\log-common\log-aspects-library\target\classes
  [INFO] 
  [INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ log-aspects-library ---
  [INFO] Using 'UTF-8' encoding to copy filtered resources.
  [INFO] Copying 1 resource
  [INFO] 
  [INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ log-aspects-library ---
  [INFO] Changes detected - recompiling the module!
  [INFO] Compiling 10 source files to D:\projects\alexshuvaev\foraudit\log-common\log-aspects-library\target\test-classes
  [INFO] 
  [INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ log-aspects-library ---
  [INFO] Surefire report directory: D:\projects\alexshuvaev\foraudit\log-common\log-aspects-library\target\surefire-reports
  
  -------------------------------------------------------
   T E S T S
  -------------------------------------------------------
  Running com.alexshuvaev.libs.logging.annotation.EnableLogAspectsImportSelectorTest
  Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.388 sec
  Running com.alexshuvaev.libs.logging.annotation.LoggableContextTest
  2021-02-13 14:36:35.552  INFO   --- [           main] .b.t.c.SpringBootTestContextBootstrapper : Neither @ContextConfiguration nor @ContextHierarchy found for test class [com.alexshuvaev.libs.logging.annotation.LoggableContextTest], using SpringBootContextLoader
  2021-02-13 14:36:35.566  INFO   --- [           main] o.s.t.c.support.AbstractContextLoader    : Could not detect default resource locations for test class [com.alexshuvaev.libs.logging.annotation.LoggableContextTest]: no resource found for suffixes {-context.xml, Context.groovy}.
  2021-02-13 14:36:35.903  INFO   --- [           main] .b.t.c.SpringBootTestContextBootstrapper : Loaded default TestExecutionListener class names from location [META-INF/spring.factories]: [org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener, org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener, org.springframework.boot.test.autoconfigure.webservices.client.MockWebServiceServerTestExecutionListener, org.springframework.test.context.web.ServletTestExecutionListener, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener, org.springframework.test.context.support.DependencyInjectionTestExecutionListener, org.springframework.test.context.support.DirtiesContextTestExecutionListener, org.springframework.test.context.transaction.TransactionalTestExecutionListener, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener, org.springframework.test.context.event.EventPublishingTestExecutionListener]
  2021-02-13 14:36:35.928  INFO   --- [           main] .b.t.c.SpringBootTestContextBootstrapper : Using TestExecutionListeners: [org.springframework.test.context.web.ServletTestExecutionListener@248ba4fc, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@54cce500, org.springframework.boot.test.mock.mockito.MockitoTestExecutionListener@755033c5, org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecutionListener@229c4d34, org.springframework.test.context.support.DirtiesContextTestExecutionListener@5b49b1df, org.springframework.test.context.event.EventPublishingTestExecutionListener@689eab53, org.springframework.boot.test.mock.mockito.ResetMocksTestExecutionListener@1c24639e, org.springframework.boot.test.autoconfigure.restdocs.RestDocsTestExecutionListener@5c9168c3, org.springframework.boot.test.autoconfigure.web.client.MockRestServiceServerResetTestExecutionListener@4ac0fdc7, org.springframework.boot.test.autoconfigure.web.servlet.MockMvcPrintOnlyOnFailureTestExecutionListener@571903ff, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverTestExecutionListener@689ea211, org.springframework.boot.test.autoconfigure.webservices.client.MockWebServiceServerTestExecutionListener@3f1e18b1]
  
    .   ____          _            __ _ _
   /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
  ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
   \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
    '  |____| .__|_| |_|_| |_\__, | / / / /
   =========|_|==============|___/=/_/_/_/
   :: Spring Boot ::        (v2.3.6.RELEASE)
  
  2021-02-13 14:36:36.489  INFO 17272 --- [           main] r.v.d.l.annotation.LoggableContextTest   : Starting LoggableContextTest on EPRUKRAW003D with PID 17272 (started by Aleksandr_Shuvaev in D:\projects\alexshuvaev\foraudit\log-common\log-aspects-library)
  2021-02-13 14:36:36.490 DEBUG 17272 --- [           main] r.v.d.l.annotation.LoggableContextTest   : Running with Spring Boot v2.3.6.RELEASE, Spring v5.2.11.RELEASE
  2021-02-13 14:36:36.490  INFO 17272 --- [           main] r.v.d.l.annotation.LoggableContextTest   : The following profiles are active: test
  2021-02-13 14:36:37.787  WARN 17272 --- [           main] o.s.w.c.s.GenericWebApplicationContext   : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'TestsConfiguration': Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: warning no match for this type name: org.springframework.boot.autoconfigure.web.BasicErrorController [Xlint:invalidAbsoluteTypeName]
  2021-02-13 14:36:37.809 ERROR 17272 --- [           main] o.s.boot.SpringApplication               : Application run failed
  
  org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'TestsConfiguration': Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: warning no match for this type name: org.springframework.boot.autoconfigure.web.BasicErrorController [Xlint:invalidAbsoluteTypeName]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:602)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
      at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)
      at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758)
      at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750)
      at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:405)
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
      at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:120)
      at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:99)
      at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:124)
      at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:123)
      at org.springframework.test.context.web.ServletTestExecutionListener.setUpRequestContextIfNecessary(ServletTestExecutionListener.java:190)
      at org.springframework.test.context.web.ServletTestExecutionListener.prepareTestInstance(ServletTestExecutionListener.java:132)
      at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:244)
      at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:227)
      at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:289)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:291)
      at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:246)
      at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)
      at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
      at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
      at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
      at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
      at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
      at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)
      at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
      at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
      at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:566)
      at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
      at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
      at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
      at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
      at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
  Caused by: java.lang.IllegalArgumentException: warning no match for this type name: org.springframework.boot.autoconfigure.web.BasicErrorController [Xlint:invalidAbsoluteTypeName]
      at org.aspectj.weaver.tools.PointcutParser.parsePointcutExpression(PointcutParser.java:319)
      at org.springframework.aop.aspectj.AspectJExpressionPointcut.buildPointcutExpression(AspectJExpressionPointcut.java:227)
      at org.springframework.aop.aspectj.AspectJExpressionPointcut.obtainPointcutExpression(AspectJExpressionPointcut.java:198)
      at org.springframework.aop.aspectj.AspectJExpressionPointcut.getClassFilter(AspectJExpressionPointcut.java:177)
      at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:226)
      at org.springframework.aop.support.AopUtils.canApply(AopUtils.java:289)
      at org.springframework.aop.support.AopUtils.findAdvisorsThatCanApply(AopUtils.java:321)
      at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findAdvisorsThatCanApply(AbstractAdvisorAutoProxyCreator.java:128)
      at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.findEligibleAdvisors(AbstractAdvisorAutoProxyCreator.java:97)
      at org.springframework.aop.framework.autoproxy.AbstractAdvisorAutoProxyCreator.getAdvicesAndAdvisorsForBean(AbstractAdvisorAutoProxyCreator.java:78)
      at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:347)
      at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:299)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:430)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1798)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594)
      ... 47 common frames omitted
  </code></pre>
  <p><strong>Pom.xml:</strong></p>
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  
  &lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
           xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
      &lt;parent&gt;
          &lt;groupId&gt;com.alexshuvaev.libs&lt;/groupId&gt;
          &lt;artifactId&gt;log-parent&lt;/artifactId&gt;
          &lt;relativePath&gt;../log-parent&lt;/relativePath&gt;
          &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;/parent&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;artifactId&gt;log-aspects-library&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-logging&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.projectlombok&lt;/groupId&gt;
              &lt;artifactId&gt;lombok&lt;/artifactId&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.aspectj&lt;/groupId&gt;
              &lt;artifactId&gt;aspectjrt&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-aspects&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.mockito&lt;/groupId&gt;
              &lt;artifactId&gt;mockito-core&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;junit&lt;/groupId&gt;
              &lt;artifactId&gt;junit&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  <p><strong>Parent Pom.xml:</strong></p>
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot;
           xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
           xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
      &lt;parent&gt;
          &lt;artifactId&gt;log-common&lt;/artifactId&gt;
          &lt;groupId&gt;com.alexshuvaev.libs&lt;/groupId&gt;
          &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;/parent&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;artifactId&gt;log-parent&lt;/artifactId&gt;
      &lt;packaging&gt;pom&lt;/packaging&gt;
  
      &lt;properties&gt;
          &lt;build.number&gt;-1&lt;/build.number&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;java.version&gt;11&lt;/java.version&gt;
          &lt;maven.compiler.source&gt;${java.version}&lt;/maven.compiler.source&gt;
          &lt;maven.compiler.target&gt;${java.version}&lt;/maven.compiler.target&gt;
  
          &lt;jacoco-plugin.version&gt;0.8.6&lt;/jacoco-plugin.version&gt;
          &lt;maven-jar-plugin.version&gt;3.2.0&lt;/maven-jar-plugin.version&gt;
          &lt;maven-compiler-plugin.version&gt;3.8.1&lt;/maven-compiler-plugin.version&gt;
  
          &lt;spring-boot.version&gt;2.3.6.RELEASE&lt;/spring-boot.version&gt;
          &lt;logback-more-appenders.version&gt;1.8.4&lt;/logback-more-appenders.version&gt;
          &lt;fluent-logger.version&gt;0.3.4&lt;/fluent-logger.version&gt;
      &lt;/properties&gt;
  
      &lt;dependencyManagement&gt;
          &lt;dependencies&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-dependencies&lt;/artifactId&gt;
                  &lt;version&gt;${spring-boot.version}&lt;/version&gt;
                  &lt;type&gt;pom&lt;/type&gt;
                  &lt;scope&gt;import&lt;/scope&gt;
              &lt;/dependency&gt;
  
              &lt;dependency&gt;
                  &lt;groupId&gt;com.sndyuk&lt;/groupId&gt;
                  &lt;artifactId&gt;logback-more-appenders&lt;/artifactId&gt;
                  &lt;version&gt;${logback-more-appenders.version}&lt;/version&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;org.fluentd&lt;/groupId&gt;
                  &lt;artifactId&gt;fluent-logger&lt;/artifactId&gt;
                  &lt;version&gt;${fluent-logger.version}&lt;/version&gt;
              &lt;/dependency&gt;
          &lt;/dependencies&gt;
      &lt;/dependencyManagement&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${maven-compiler-plugin.version}&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;forceJavacCompilerUse&gt;true&lt;/forceJavacCompilerUse&gt;
                      &lt;release&gt;${java.version}&lt;/release&gt;
                      &lt;compilerArgs&gt;
                          &lt;arg&gt;-Amapstruct.defaultComponentModel=spring&lt;/arg&gt;
                          &lt;arg&gt;-Amapstruct.unmappedTargetPolicy=WARN&lt;/arg&gt;
                          &lt;arg&gt;-Amapstruct.suppressGeneratorTimestamp=true&lt;/arg&gt;
                      &lt;/compilerArgs&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-jar-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${maven-jar-plugin.version}&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;archive&gt;
                          &lt;manifest&gt;
                              &lt;addDefaultImplementationEntries&gt;true&lt;/addDefaultImplementationEntries&gt;
                              &lt;addDefaultSpecificationEntries&gt;true&lt;/addDefaultSpecificationEntries&gt;
                          &lt;/manifest&gt;
                          &lt;manifestEntries&gt;
                              &lt;Build-Number&gt;${build.number}&lt;/Build-Number&gt;
                          &lt;/manifestEntries&gt;
                      &lt;/archive&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  
              &lt;plugin&gt;
                  &lt;groupId&gt;org.jacoco&lt;/groupId&gt;
                  &lt;artifactId&gt;jacoco-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${jacoco-plugin.version}&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;prepare-agent&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                      &lt;execution&gt;
                          &lt;id&gt;report&lt;/id&gt;
                          &lt;phase&gt;prepare-package&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;report&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  <p>In the code I have an annotation <code>@EnableAspectJAutoProxy</code>.
  When I deleted, error is disappeared, but my tests not passing, because CGLIB fields are null. But must be like on this screenshot:</p>
  <p>I tried to add BasicErrorController class in my code. Empty class with package: package org.springframework.boot.autoconfigure.web;
  And then no errors, and all tests are passing. But I think it's not a good way.</p>
  <p>Some more code:
  In my main package:</p>
  <pre class="lang-java prettyprint-override"><code>package com.alexshuvaev.libs.logging.annotation;
  
  import org.springframework.context.annotation.EnableAspectJAutoProxy;
  import org.springframework.context.annotation.Import;
  import com.alexshuvaev.libs.logging.aspects.OperType;
  
  import java.lang.annotation.ElementType;
  import java.lang.annotation.Retention;
  import java.lang.annotation.RetentionPolicy;
  import java.lang.annotation.Target;
  
  @Target(ElementType.TYPE)
  @Retention(RetentionPolicy.RUNTIME)
  @Import(EnableLogAspectsImportSelector.class)
  @EnableAspectJAutoProxy
  public @interface EnableLogAspects {
      OperType[] value() default {};
  }
  </code></pre>
  <p>In my test package:</p>
  <pre class="lang-java prettyprint-override"><code>package com.alexshuvaev.libs.logging;
  
  import com.alexshuvaev.libs.logging.config.TestsConfiguration;
  
  import org.junit.runner.RunWith;
  import org.springframework.boot.test.context.SpringBootTest;
  import org.springframework.test.context.ActiveProfiles;
  import org.springframework.test.context.junit4.SpringRunner;
  
  @ActiveProfiles(&quot;test&quot;)
  @RunWith(SpringRunner.class)
  @SpringBootTest(classes = TestsConfiguration.class)
  public abstract class IntegrationTest {
  }
  </code></pre>
  <pre class="lang-java prettyprint-override"><code>package com.alexshuvaev.libs.logging.config;
  
  import com.alexshuvaev.libs.logging.IntegrationTest;
  import com.alexshuvaev.libs.logging.annotation.EnableLogAspects;
  
  import org.springframework.context.annotation.ComponentScan;
  import org.springframework.context.annotation.Configuration;
  import org.springframework.context.annotation.EnableAspectJAutoProxy;
  
  @Configuration
  @EnableLogAspects
  @ComponentScan(basePackageClasses = IntegrationTest.class)
  public class TestsConfiguration {
  
  }
  </code></pre>
  <pre class="lang-java prettyprint-override"><code>package com.alexshuvaev.libs.logging.annotation;
  
  import static org.junit.Assert.assertEquals;
  import static org.junit.Assert.assertTrue;
  import static com.alexshuvaev.libs.logging.aspects.OperType.LOGGABLE;
  import static com.alexshuvaev.libs.logging.aspects.OperType.REST;
  
  import com.alexshuvaev.libs.logging.IntegrationTest;
  import com.alexshuvaev.libs.logging.aspects.LoggableAspect;
  import com.alexshuvaev.libs.logging.aspects.OperType;
  import com.alexshuvaev.libs.logging.testdata.SomeClassService;
  import com.alexshuvaev.libs.logging.testdata.SomeController;
  import com.alexshuvaev.libs.logging.testdata.SomeService;
  import com.alexshuvaev.libs.logging.testdata.resource.SomeResource;
  import com.alexshuvaev.libs.logging.utils.JoinPointLogUtils;
  
  import ch.qos.logback.classic.Level;
  import ch.qos.logback.classic.LoggerContext;
  import ch.qos.logback.classic.spi.ILoggingEvent;
  import ch.qos.logback.core.read.ListAppender;
  import lombok.extern.slf4j.Slf4j;
  import org.junit.After;
  import org.junit.Before;
  import org.junit.Test;
  import org.slf4j.LoggerFactory;
  import org.springframework.beans.factory.annotation.Autowired;
  
  @Slf4j
  public class LoggableContextTest extends IntegrationTest {
  
      private static ListAppender&lt;ILoggingEvent&gt; loggingAppender;
  
      @Before
      public void initAppender() {
          LoggerContext context = (LoggerContext) LoggerFactory.getILoggerFactory();
          loggingAppender = new ListAppender&lt;&gt;();
          loggingAppender.setContext(context);
          loggingAppender.start();
          context.getLogger(SomeService.class).addAppender(loggingAppender);
          context.getLogger(SomeClassService.class).addAppender(loggingAppender);
          context.getLogger(SomeController.class).addAppender(loggingAppender);
          context.getLogger(SomeResource.class).addAppender(loggingAppender);
      }
  
      @After
      public void cleanAppender() {
          loggingAppender.list.clear();
      }
  
      @Autowired
      private SomeService someService;
  
      @Autowired
      private SomeClassService someClassService;
  
      @Autowired
      private SomeController someController;
  
      @Autowired
      private SomeResource someResource;
  
  
      @Test
      public void defaultTest() {
          someService.withDefaultVoid();
          assertAppenderSingleEvent(JoinPointLogUtils.END_EXECUTING_TEMPLATE_DETAILED_PARAMS, Level.DEBUG, SomeService.class);
      }
  }
  </code></pre>
  <p>Why is <code>@EnableAspectJAutoProxy</code> trying to find class <code>BasicErrorController</code> with a package from Spring Boot 1.5.x?
  I cannot find dependencies incompatibility in my Pom.xml. May be I forgot to add any dependency?</p>