Skip to content

Instantly share code, notes, and snippets.

@john-nash-rs
Created July 12, 2018 13:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save john-nash-rs/8b885dc17ad415dd6e0ec71e76faf312 to your computer and use it in GitHub Desktop.
Save john-nash-rs/8b885dc17ad415dd6e0ec71e76faf312 to your computer and use it in GitHub Desktop.
import com.fasterxml.jackson.annotation.JsonProperty;
import io.dropwizard.Configuration;
import io.dropwizard.db.DataSourceFactory;
/**
* Created by harshvardhan on 12/07/18.
*/
public class MyConfiguration extends Configuration {
private String url;
private DataSourceFactory database = new DataSourceFactory();
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
}
@JsonProperty("database")
public DataSourceFactory getDataSourceFactory() {
return database;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment