i am building a web application using Spring Boot and HTML pages.
In multiple HTML pages I am using the same navbar:
<ul class="navbar-nav mr-auto">
<li class="nav-item active">
<a href="/home" class="nav-link">Home</a>
</li>
<li class="nav-item">
<a href="/user/showAllProducts" class="nav-link">All Products</a>
</li>
Now I had to change the URL of the API that shows all products (/user/showAllProducts) and I had to change about 10 HTML pages.
Is there an easy way to manage all API URLs in one config file (application.properties?) and directly injecting them in HTML pages? The list item that will show all products is just one example of many other links in the navbar.
Thanks a lot for your help