title: The bean 'metaDataSourceAdvisor', defined in null, could not be registered
body: <p>I've updated the Spring Boot version from 2.0.3 to 2.1.1 but I'm getting this:</p>
  
  <pre><code>***************************
  APPLICATION FAILED TO START
  ***************************
  
  Description:
  
  The bean 'metaDataSourceAdvisor', defined in null, could not be registered. A bean with that name has already been defined in null and overriding is disabled.
  
  Action:
  
  Consider renaming one of the beans or enabling overriding by setting spring.main.allow-bean-definition-overriding=true
  </code></pre>
  
  <p>I get the error - the problem is that <code>defined in null</code> is not really a good pointer where to look. I've seen <a href="https://stackoverflow.com/questions/51367566/trouble-when-changing-spring-boot-version-from-2-0-3-release-to-2-1-0-build-snap">this question</a> but I'd actually prefer to keep disallowing overriding ambiguous beans. </p>
  
  <p>Any ideas?</p>
  
  <hr>
  
  <p><strong>Log output</strong></p>
  
  <pre><code>2019-01-06 07:33:39.282  INFO 29626 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable
  2019-01-06 07:33:39.282  INFO 29626 --- [  restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'
  2019-01-06 07:33:39.912  INFO 29626 --- [  restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data repositories in DEFAULT mode.
  2019-01-06 07:33:39.997  INFO 29626 --- [  restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 80ms. Found 23 repository interfaces.
  2019-01-06 07:33:39.999  WARN 29626 --- [  restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.support.BeanDefinitionOverrideException: Invalid bean definition with name 'metaDataSourceAdvisor' defined in null: Cannot register bean definition [Root bean: class [org.springframework.security.access.intercept.aopalliance.MethodSecurityMetadataSourceAdvisor]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] for bean 'metaDataSourceAdvisor': There is already [Root bean: class [org.springframework.security.access.intercept.aopalliance.MethodSecurityMetadataSourceAdvisor]; scope=; abstract=false; lazyInit=false; autowireMode=0; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=null; factoryMethodName=null; initMethodName=null; destroyMethodName=null] bound.
  2019-01-06 07:33:40.008  INFO 29626 --- [  restartedMain] ConditionEvaluationReportLoggingListener : 
  
  Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
  2019-01-06 07:33:40.010 ERROR 29626 --- [  restartedMain] o.s.b.d.LoggingFailureAnalysisReporter   : 
  </code></pre>