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 Summary
FieldsModifier and TypeFieldDescriptionprivate BooksRepository
private BookDTOFactory
private BooksMapper
private org.springframework.data.mongodb.core.MongoTemplate
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
booksRepository
-
mongoTemplate
@Autowired private org.springframework.data.mongodb.core.MongoTemplate mongoTemplate -
dtoFactory
-
mapper
-
-
Constructor Details
-
Init
public Init()
-
-
Method Details
-
run
- Specified by:
run
in interfaceorg.springframework.boot.CommandLineRunner
- Throws:
Exception
-