title: java.lang.NoClassDefFoundError: org/springframework/boot/autoconfigure/security/SecurityPrerequisite
body: <p>I am trying to deploy my Spring boot Rest API application on Tomcat in Eclipse Mars and getting following exception while deployment.</p>
  
  <pre><code>org.springframework.beans.factory.CannotLoadBeanClassException: Error loading class [org.springframework.boot.actuate.autoconfigure.ManagementSecurityAutoConfiguration$ManagementSecurityPropertiesConfiguration] for bean with name 'org.springframework.boot.actuate.autoconfigure.ManagementSecurityAutoConfiguration$ManagementSecurityPropertiesConfiguration' defined in null: problem with class file or dependent class; nested exception is java.lang.NoClassDefFoundError: org/springframework/boot/autoconfigure/security/SecurityPrerequisite
  at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1331) ~[AbstractBeanFactory.class:4.1.6.RELEASE]
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:622) ~[AbstractAutowireCapableBeanFactory.class:4.1.6.RELEASE]
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:591) ~[AbstractAutowireCapableBeanFactory.class:4.1.6.RELEASE]
  at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1397) ~[AbstractBeanFactory.class:4.1.6.RELEASE]
  at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:968) ~[AbstractBeanFactory.class:4.1.6.RELEASE]
  at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry$OptimizedBeanTypeRegistry.addBeanTypeForNonAliasDefinition(BeanTypeRegistry.java:257) [BeanTypeRegistry$OptimizedBeanTypeRegistry.class:1.2.0.RELEASE]
  at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry$OptimizedBeanTypeRegistry.addBeanType(BeanTypeRegistry.java:246) [BeanTypeRegistry$OptimizedBeanTypeRegistry.class:1.2.0.RELEASE]
  at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry$OptimizedBeanTypeRegistry.getNamesForType(BeanTypeRegistry.java:227) [BeanTypeRegistry$OptimizedBeanTypeRegistry.class:1.2.0.RELEASE]
  at org.springframework.boot.autoconfigure.condition.OnBeanCondition.collectBeanNamesForType(OnBeanCondition.java:154) [OnBeanCondition.class:1.2.0.RELEASE]
  at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getBeanNamesForType(OnBeanCondition.java:143) [OnBeanCondition.class:1.2.0.RELEASE]
  at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchingBeans(OnBeanCondition.java:115) [OnBeanCondition.class:1.2.0.RELEASE]
      at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchOutcome(OnBeanCondition.java:90) [OnBeanCondition.class:1.2.0.RELEASE]
      at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:45) [SpringBootCondition.class:1.2.0.RELEASE]
      at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:102) [ConditionEvaluator.class:4.1.6.RELEASE]
      at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForBeanMethod(ConfigurationClassBeanDefinitionReader.java:190) [ConfigurationClassBeanDefinitionReader.class:4.1.6.RELEASE]
      at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitionsForConfigurationClass(ConfigurationClassBeanDefinitionReader.java:148) [ConfigurationClassBeanDefinitionReader.class:4.1.6.RELEASE]
      at org.springframework.context.annotation.ConfigurationClassBeanDefinitionReader.loadBeanDefinitions(ConfigurationClassBeanDefinitionReader.java:124) [ConfigurationClassBeanDefinitionReader.class:4.1.6.RELEASE]
      at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:318) [ConfigurationClassPostProcessor.class:4.1.6.RELEASE]
      at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:239) [ConfigurationClassPostProcessor.class:4.1.6.RELEASE]
      at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:254) [PostProcessorRegistrationDelegate.class:4.1.6.RELEASE]
      at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:94) [PostProcessorRegistrationDelegate.class:4.1.6.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:606) [AbstractApplicationContext.class:4.1.6.RELEASE]
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:462) [AbstractApplicationContext.class:4.1.6.RELEASE]
      at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:109) [EmbeddedWebApplicationContext.class:1.2.0.RELEASE]
      at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:691) [SpringApplication.class:1.2.0.RELEASE]
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:321) [SpringApplication.class:1.2.0.RELEASE]
      at org.springframework.boot.context.web.SpringBootServletInitializer.run(SpringBootServletInitializer.java:117) [SpringBootServletInitializer.class:1.2.0.RELEASE]
      at org.springframework.boot.context.web.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:108) [SpringBootServletInitializer.class:1.2.0.RELEASE]
      at org.springframework.boot.context.web.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:68) [SpringBootServletInitializer.class:1.2.0.RELEASE]
      at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:175) [SpringServletContainerInitializer.class:4.1.6.RELEASE]
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173) [catalina.jar:8.0.9]
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [catalina.jar:8.0.9]
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1396) [catalina.jar:8.0.9]
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1386) [catalina.jar:8.0.9]
      at java.util.concurrent.FutureTask.run(Unknown Source) [na:1.8.0_102]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_102]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_102]
      at java.lang.Thread.run(Unknown Source) [na:1.8.0_102]
  Caused by: java.lang.NoClassDefFoundError: org/springframework/boot/autoconfigure/security/SecurityPrerequisite
      at java.lang.ClassLoader.defineClass1(Native Method) ~[na:1.8.0_102]
      at java.lang.ClassLoader.defineClass(Unknown Source) ~[na:1.8.0_102]
      at java.security.SecureClassLoader.defineClass(Unknown Source) ~[na:1.8.0_102]
      at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2479) ~[catalina.jar:8.0.9]
      at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:880) ~[catalina.jar:8.0.9]
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1294) ~[catalina.jar:8.0.9]
      at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1177) ~[catalina.jar:8.0.9]
      at org.springframework.util.ClassUtils.forName(ClassUtils.java:249) ~[ClassUtils.class:4.1.6.RELEASE]
      at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:395) ~[AbstractBeanDefinition.class:4.1.6.RELEASE]
      at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1349) ~[AbstractBeanFactory.class:4.1.6.RELEASE]
      at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1320) ~[AbstractBeanFactory.class:4.1.6.RELEASE]
      ... 37 common frames omitted
  </code></pre>
  
  <p>I am not able to understand why it is not able to find the class although, I have it in my maven dependencies
  <code>spring-boot-autoconfigure-1.2.3.RELEASE.jar</code></p>
  
  <p>Any help would be highly appreciated.</p>