October 2018
Intermediate to advanced
982 pages
23h 29m
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