February 2018
Intermediate to advanced
286 pages
7h 20m
English
After running the application, the first thing that you might have noticed is that the printed counts all showed 0, even though StartupRunner had printed Number of books: 1 to the console, as shown in the following output:
c.e.b.dbcount.DbCountRunner : AuthorRepository has 0 entries c.e.b.dbcount.DbCountRunner : BookRepository has 0 entries c.e.b.dbcount.DbCountRunner : PublisherRepository has 0 entries c.e.b.dbcount.DbCountRunner : ReviewerRepository has 0 entries com.example.bookpub.StartupRunner : Welcome to the Book Catalog System! com.example.bookpub.StartupRunner : Number of books: 1
This is because Spring Boot is randomly executing CommandLineRunners and, as we changed the configuration to use the @EnableDbCounting ...
Read now
Unlock full access