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 Details

    • booksRepository

      @Autowired private BooksRepository booksRepository
    • mongoTemplate

      @Autowired private org.springframework.data.mongodb.core.MongoTemplate mongoTemplate
    • dtoFactory

      @Autowired private BookDTOFactory dtoFactory
    • mapper

      @Autowired private BooksMapper mapper
  • Constructor Details

    • Init

      public Init()
  • Method Details

    • run

      public void run(String... args) throws Exception
      Specified by:
      run in interface org.springframework.boot.CommandLineRunner
      Throws:
      Exception