use of com.tvd12.ezyfox.bean.EzyBeanContext in project calabash by youngmonkeys.
the class LocalBaseTest method newBeanContext.
protected EzyBeanContext newBeanContext() {
MongoClient mongoClient = newMongoClient();
EzyBeanContextBuilder builder = EzyBeanContext.builder().addSingleton("mongoClient", mongoClient).scan("com.tvd12.calabash.local.test.mappersist");
addAutoImplMongoRepo(builder, mongoClient);
return builder.build();
}
use of com.tvd12.ezyfox.bean.EzyBeanContext in project ezyfox-examples by tvd12.
the class EzyFoxBeanExample method main.
public static void main(String[] args) {
final EzyBeanContext beanContext = EzyBeanContext.builder().scan("com.tvd12.ezyfox.example.bean").build();
final BookController bookController = (BookController) beanContext.getBean(BookController.class);
bookController.saveBook(new Book(1L, "EzyFox in action"));
}
Aggregations