conditional @Autowired?
<p>I have a HsqldbReconciler (for "work" with a HSQLDB database) which I autowired, like:</p>

<pre><code>@Autowired
HsqldbReconciler hsqldbReconciler;
</code></pre>

<p>In Future there will be a OracleReconciler, MssqlReconciler, etc. I will need to use them accordingly to the type of connection a user has chosen.</p>

<p>How should I implement this? Usually I would have a kind of factory, which returns only the needed Reconciler. The only way in spring, I can currently imagine, is to Autowire an instance of each Reconciler, then use one of them in the code. Is there a better way?</p>