title: Dropwizard how to configure a datasource?
body: <p>Im new with DropWizard and have this situation:</p>
  
  <p>We had an web application that now will be split into 3 parts:</p>
  
  <ul>
  <li>core: has all the business intelligence,</li>
  <li>api: will be a dropwizard project that will call the core methods,clases and etc. , </li>
  <li>and client: that actually will be several clients; web, iphone, android, etc. </li>
  </ul>
  
  <p>Im trying to create a small project first with the dropwizard, and call some small methods on the core. Example if a call: localhost:8080/NewApi/getUserName?id=12345;</p>
  
  <p>have something on my code like this:</p>
  
  <pre><code>@GET
  public String getUser(@Auth User user, @QueryParam("id") Optional&lt;String&gt; id) {
  
     String userName =  net.newapp.core.data.User.getUserName(id);
      return  userName;
  }
  </code></pre>
  
  <p>However I haven't been able to configure the database properly. I have read the JDBI tutorial on the dropwizard, but the examples suggest to use DAOs and the JDBI SQL API, but I already have my queries that I need on the core, I dont want to give that job to the Dropwizard. </p>
  
  <p>To test if the core was properly separated from the old project I created a small webapp using jetty and configuring a simple jndi datasource, and used the core as a simple library and worked just fine, and since Dropwizard use a Jetty I tought that I could configure that on the Dropwizard project, but from some posts I have been reading It looks that I can't do that, so my question is, how I configure a simple datasource that my clases on the core can use?. </p>
  
  <p>Thanks in advance</p>