Question: Create a spring project with the Spring webstarter and Thymeleaf dependencies that tracks page views on your website [2] A class PageCounter that.. - stores


Create a spring project with the Spring webstarter and Thymeleaf dependencies that tracks page views on your website

[2] A class PageCounter that.. - stores a Integer pageCounter - has a method to increment the integer - has a method to get the current pageCount [5] A class called PageCountConfig that... - is a spring configuration class - creates a PageCounter dependency

[5 A Controller WelcomeController that - has a mapping for "/" that returns a 'welcome' template - should increment the count for pageCount when a method is called - should add the current page count to the model -has a PageCounter injected into it

[3] A Controller called PageCountController that.. - is a rest controller - has a mapping for "/currentcount" that returns the current pagecount - has a PageCounter injected into it

[5] A template welcome.html that - contains some basic html that welcomes you to the website (put something like "welcome to my website" in a header) - displays the current visiter count - should auto update the visitor count with ajax every 3 seconds by calling the PageCountController/currentcount

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To create a Spring project with the specified requirements follow these steps 1 Create a new Spring Boot project using Spring Initializr with the foll... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!