I added the following command to application.properties file.
server.contextPath=/SpringBootOracle
Now, I have a hyperlink in the html page as shown below
<a href="/product/new">New Product</a>
Every time when I click the link, it will jump to
localhost:8080/product/new
Is there any way I can append the application context to the link so that I can get below?
localhost:8080/SpringBootOracle/product/new
If you use thymeleaf then try with this:
<a th:href="@{/product/new}">New Product</a>