Class MongoDBBooksApp.Init
java.lang.Object
info.ejava.examples.db.mongo.books.MongoDBBooksApp.Init
- All Implemented Interfaces:
- org.springframework.boot.CommandLineRunner
- Enclosing class:
- MongoDBBooksApp
@Component
@ConditionalOnProperty(prefix="db",
                       name="populate",
                       havingValue="true",
                       matchIfMissing=true)
public class MongoDBBooksApp.Init
extends Object
implements org.springframework.boot.CommandLineRunner
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate BooksRepositoryprivate BookDTOFactoryprivate BooksMapperprivate org.springframework.data.mongodb.core.MongoTemplate
- 
Constructor SummaryConstructors
- 
Method Summary
- 
Field Details- 
booksRepository
- 
mongoTemplate@Autowired private org.springframework.data.mongodb.core.MongoTemplate mongoTemplate
- 
dtoFactory
- 
mapper
 
- 
- 
Constructor Details- 
Initpublic Init()
 
- 
- 
Method Details- 
run- Specified by:
- runin interface- org.springframework.boot.CommandLineRunner
- Throws:
- Exception
 
 
-