title: No bean of type [xxxx.xxxx.xxxx] exists. Make sure the bean is not disabled by bean requirements Micronaut messaging application
body: <p>I have below project structure</p>
  <p><a href="https://i.stack.imgur.com/7O6kt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7O6kt.png" alt="enter image description here" /></a></p>
  <p>The main project <strong>DEMO</strong> has a dependency on the Gradle project <strong>SERVICE</strong> which implements the interface from the <strong>PORT</strong> project.</p>
  <p><strong>Demo build.gradle</strong></p>
  <pre><code>dependencies {
      implementation project(':port')
      runtime project(':service')
  } 
  </code></pre>
  <p><strong>Service build.gradle</strong></p>
  <pre><code>dependencies {
      implementation project(':port')
  
      implementation(&quot;javax.annotation:javax.annotation-api:1.3.2&quot;)
      compile &quot;io.micronaut:micronaut-inject:2.4.0&quot;
      annotationProcessor &quot;io.micronaut:micronaut-inject-java:2.4.0&quot;
  }
  </code></pre>
  <p><strong>Service class implement IStartUpPort</strong></p>
  <pre><code>@Singleton
  public class StartUpService implements IStartUpPort {
      @Override
      public void toUpperCase() {
          System.out.println(&quot;Something happened&quot;);
      }
  }
  </code></pre>
  <p><strong>Port build.gradle</strong></p>
  <pre><code>dependencies {
      implementation(&quot;javax.annotation:javax.annotation-api:1.3.2&quot;)
      compile &quot;io.micronaut:micronaut-inject:2.4.0&quot;
      annotationProcessor &quot;io.micronaut:micronaut-inject-java:2.4.0&quot;
  }
  </code></pre>
  <p><strong>Port interface</strong></p>
  <pre><code>public interface IStartUpPort {
      void toUpperCase();
  }
  </code></pre>
  <p>In the main project, I am doing the DI on a service project and facing the exception</p>
  <pre><code>@Singleton
  public class StartUp implements ApplicationEventListener&lt;StartupEvent&gt; {
      private final IStartUpPort iStartUpPort;
  
      public StartUp(IStartUpPort iStartUpPort) {
          this.iStartUpPort = iStartUpPort;
      }
  
      @Override
      public void onApplicationEvent(StartupEvent event) {
          iStartUpPort.toUpperCase();
      }
  }
  </code></pre>
  <p><strong>Exception</strong></p>
  <pre><code>Message: No bean of type [fete.bird.IStartUpPort] exists. Make sure the bean is not disabled by bean requirements (enable trace logging for 'io.micronaut.context.condition' to check) and if the bean is enabled then ensure the class is declared a bean and annotation processing is enabled (for Java and Kotlin the 'micronaut-inject-java' dependency should be configured as an annotation processor).
  Path Taken: new StartUp([IStartUpPort iStartUpPort])
      at io.micronaut.context.AbstractBeanDefinition.getBeanForConstructorArgument(AbstractBeanDefinition.java:1034)
      at com.example.$StartUpDefinition.build(Unknown Source)
      at io.micronaut.context.DefaultBeanContext.doCreateBean(DefaultBeanContext.java:1943)
      at io.micronaut.context.DefaultBeanContext.addCandidateToList(DefaultBeanContext.java:3091)
      at io.micronaut.context.DefaultBeanContext.getBeanRegistrations(DefaultBeanContext.java:2968)
      at io.micronaut.context.DefaultBeanContext.getBeansOfType(DefaultBeanContext.java:762)
      at io.micronaut.context.DefaultBeanContext.publishEvent(DefaultBeanContext.java:1304)
      at io.micronaut.context.DefaultBeanContext.start(DefaultBeanContext.java:246)
      at io.micronaut.context.DefaultApplicationContext.start(DefaultApplicationContext.java:165)
      at io.micronaut.runtime.Micronaut.start(Micronaut.java:71)
      at io.micronaut.runtime.Micronaut.run(Micronaut.java:311)
      at io.micronaut.runtime.Micronaut.run(Micronaut.java:297)
      at com.example.Application.main(Application.java:8)
  Caused by: io.micronaut.context.exceptions.NoSuchBeanException: No bean of type [fete.bird.IStartUpPort] exists. Make sure the bean is not disabled by bean requirements (enable trace logging for 'io.micronaut.context.condition' to check) and if the bean is enabled then ensure the class is declared a bean and annotation processing is enabled (for Java and Kotlin the 'micronaut-inject-java' dependency should be configured as an annotation processor).
      at io.micronaut.context.DefaultBeanContext.getBeanInternal(DefaultBeanContext.java:2367)
      at io.micronaut.context.DefaultBeanContext.getBean(DefaultBeanContext.java:1261)
      at io.micronaut.context.AbstractBeanDefinition.getBeanForConstructorArgument(AbstractBeanDefinition.java:1012)
      ... 12 common frames omitted
  </code></pre>
  <p>This is a Micronuat messenging application repo can be found here <a href="https://github.com/anandjaisy/MessengingMultiGradleProject" rel="nofollow noreferrer">https://github.com/anandjaisy/MessengingMultiGradleProject</a></p>