io.robe.hibernate.HibernateConfiguration Maven / Gradle / Ivy
package io.robe.hibernate;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.dropwizard.Configuration;
import io.dropwizard.db.DataSourceFactory;
import io.dropwizard.db.DatabaseConfiguration;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
public class HibernateConfiguration implements DatabaseConfiguration {
@Valid
@NotNull
@JsonProperty("database")
private DataSourceFactory database = new DataSourceFactory();
@Override
public DataSourceFactory getDataSourceFactory(Configuration configuration) {
return database;
}
}