title: Spring choose implementation at runtime from dependencies
body: <p>I have 5 modules.</p>
  
  <ul>
  <li>DB interfaces</li>
  <li>DB impl A</li>
  <li>DB impl B</li>
  <li>App 1</li>
  <li>App 2</li>
  </ul>
  
  <p>In App 1 I want to use only DB impl A so I include dependencies to DB interfaces and DB impl A.</p>
  
  <p>In App 2 I want to use both impl. The condition to choose impl depends on every request and DB query. For example request have some token that we use to query from DB which impl choose. </p>
  
  <p>Implementations from A and B are adnotated with @Repository.</p>
  
  <p>I am  considering to use some Holder with request scope and @Condition. But this classes from impl A and impl B cannot be change by adding new adnotations because in App 1 we cannot guarantee conditions pass.</p>