I have shared a sample Spring MVC web project on my GitLab and tried to put together a couple of wiki pages to help you understand better. I believe it will be a valuable asset for you if you are trying to learn about the fundamentals.
In this project you will see the following concepts in action:
Bean Configuration File
Model – View – Controller
This is the link to the Home page of the wiki: https://gitlab.com/spring-mvc/spring-mvc-example-1/wikis/home
This is the link to the repository: https://gitlab.com/spring-mvc/spring-mvc-example-1/tree/master
Hope this helps.