title: Spring. Registering Aspect with @Bean
body: <p>I need some help with creating Aspect bean.</p>
  
  <p>I have module <code>A</code>, <code>B</code>... and module <code>starter-x</code>. 
  I have a couple of Aspects declared in module starter-x, and configurations for them(like spring data repository monitoring aspect with configuration annotated with <code>@ConditionalOnClass(Repository.class)</code> etc). </p>
  
  <p>Here's how example configuration looks like </p>
  
  <pre><code>@Configuration
  @ConditionalOnClass(Repository.class)
  public class RepositoryMonitoringConfiguration {
  
      @Bean
      @Qualifier("RepositoryCallCounter")
      public DatabaseCallCounter repositoryCounter(){
          return new RepositoryCallCounter();
      }
  
  
  }
  </code></pre>
  
  <p>And i have class with <code>@Aspect</code> annotation(but not <code>@Component</code>, when i create bean with <code>@Component</code> not <code>@Configuration</code>, everything is ok)</p>
  
  <p>So my question, is it possible to provide aspect bean in <code>@Configuration</code> class, without <code>@Component</code> annotation on it (I want to create cool starter with auto configuration)</p>