0

We have old REST APIs in Jersey with no standard API EndPoints, Now We have refactored the APIs and come up with new Spring Boot Project.

Here we have written APIs which will support old endpoints as well as newly standardized endpoints, but My Problem statement is our old endpoints are getting used by many of our clients and can't be changed immediately to new endpoints.

Old Endpoints: POST http://DNS/WARNAME/insertProduct

New Endpoints to support old: POST http://DNS/DemoProduct/insertProduct

Old Endpoints in New Project will become: POST http://DNS/WARNAME/DemoProduct/insertProduct

New Standard Endpoint: POST http://DNS/products no issues here.

Now if I will be able to ignore the war name while accessing then it will fit my requirement as below in my new project.

POST http://DNS/DemoProduct/insertProduct

As before we have planned to deploy it as Spring Boot executable JAR, which will resolve our issue, but we have some Infra issues so we can not deploy it as a JAR.

Here also we don't want to remove the old app from production.

I have tried with below configuration in Spring Boot application.properties but no luck, Please suggest me if you have any idea to ignore a WAR name completely while accessing APIs.

spring.data.rest.basePath=/
server.context-path=/
Hardik Patel
  • 1,033
  • 1
  • 12
  • 16

0 Answers0