title: Load service for interface only where there is no other service
body: <p>In my application I have interface with default implementation that is service:</p>
  
  <pre><code>public interface MessageGenerator {
      Message getMessage();
  }
  
  @Service
  public class PropertiesMessageGenerator implements MessageGenerator {
      @Override
      public Message getMessage() {
          return doSmth();
      }
  }
  </code></pre>
  
  <p>This service is loaded by spring boots <code>#ComponentScan</code> and everything works fine until I've added new implementation with <code>@Profile</code></p>
  
  <pre><code>@Service
  @Profile("p1")
  public class ProfileMessageGenerator implements MessageGenerator {
      @Override
      public Message getMessage() {
          return doSmthWithProfile();
      }
  }
  </code></pre>
  
  <p>How can I stop loading into DI service <code>PropertiesMessageGenerator</code> when <code>ProfileMessageGenerator</code> is in context?</p>
  
  <p>PS
  I cannot use <code>@Profile("default")</code> on <code>MultipleMessages</code>, because I've got more profiles that I load at one time.</p>