title: Error creating bean in Spring boot
body: <p>i created an app based on spring boot and spring boot data , so i want to use</p>
  
  <p>HSQLDB in memory </p>
  
  <p>This is my Application Class :</p>
  
  <pre><code>package boot;
  
  import org.springframework.boot.SpringApplication;
  import org.springframework.boot.autoconfigure.SpringBootApplication;
  
  @SpringBootApplication()
  public class Application {
  
      public static void main(String[] args) {
  
          SpringApplication.run(Config.class);
  
      }
  
  }
  </code></pre>
  
  <p>and this is Config class :</p>
  
  <pre><code>@Configuration
  @EnableAutoConfiguration
  @EnableJpaRepositories
  @ComponentScan(basePackages = {"controller", "dao", "service"})
  @EnableTransactionManagement
  class Config {
  
  
      @Bean(name = "dataSource")
      public DataSource dataSource() {
          EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();
          return builder.setType(EmbeddedDatabaseType.HSQL).build();
      }
  
      @Bean(name = "entityManager")
      public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
          HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
          vendorAdapter.setDatabase(Database.HSQL);
          vendorAdapter.setGenerateDdl(true);
  
          LocalContainerEntityManagerFactoryBean factory = new LocalContainerEntityManagerFactoryBean();
          factory.setJpaVendorAdapter(vendorAdapter);
          factory.setPackagesToScan(getClass().getPackage().getName());
          factory.setDataSource(dataSource());
  
          return factory;
      }
  
      @Bean
      public PlatformTransactionManager transactionManager() {
          return new JpaTransactionManager();
      }
  
  }
  </code></pre>
  
  <p>as you khnow in the these three packages "controller", "dao", "service" there are 
  some @Autowired</p>
  
  <p>when i run the Application, i got this error :</p>
  
  <pre><code>Error creating bean with name 'taskController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private service.TaskManager controller.TaskController.taskManager; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'taskManagerImpl' defined in file [D:\JavaSe\restAng\target\classes\service\impl\TaskManagerImpl.class]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: org/aspectj/util/PartialOrder$PartialComparable
      at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) ~[spring-beans-4.2.6.RELEASE.jar:4.2.6.RELEASE]
  </code></pre>
  
  <p>this is my TaskController</p>
  
  <pre><code>@RestController
  public class TaskController {
  
      @Autowired
      private TaskManager taskManager;
  
  
      @RequestMapping(value = "/tasks", method = RequestMethod.GET, headers = "Accept=application/json")
      public List&lt;Task&gt; getAllTasks() {
          return taskManager.getAll();
      }
  }
  </code></pre>
  
  <p>What's wrong with it ?</p>