com.github.carlopantaleo.jmodel.configuration.EntitiesConfiguration Maven / Gradle / Ivy
package com.github.carlopantaleo.jmodel.configuration;
import com.github.carlopantaleo.jmodel.basedao.BaseDao;
import com.jmodel.generated.MyTestTable;
import org.hibernate.SessionFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class EntitiesConfiguration {
@Bean
BaseDao myTestTableBaseDao(SessionFactory sessionFactory) {
BaseDao myTestTableBaseDao = new BaseDao<>(sessionFactory);
myTestTableBaseDao.setClazz(MyTestTable.class);
return myTestTableBaseDao;
}
}