use of com.zavada.repository.ProductRepository in project Logos_Materials_October_2017 by VolodymyrZavada.
the class SpringBootConsultationProjectApplication method addProducts.
static void addProducts(ConfigurableApplicationContext context) {
ProductRepository productRepository = context.getBean(ProductRepository.class);
ProductEntity product = productRepository.findOne(1);
if (product == null) {
productRepository.save(getProducts());
}
}
Aggregations