How to Access API end point from executable jar in another maven project

I have one scenario where I have backend API which is build in springboot. I need to build API project as executable jar and want to use that in another project. which is basic maven project where I am using frontend code. I want to include my executable jar in frontend project and then want to access the API end point directly from the jar. Without giving any reference in frontend code. What configuration I need to do for this in POM? I have tried multiple online solution but none of them working. I am getting 404 always if I try to access the API end point from frontend project. Note: Final deployment should happen on Tomcat server with Frontend code and API jar both in same War file and deployed in tomcat. So I should be able to access the Backend API directly from jar.

If anyone can help on this it would be great help. Thanks in advance.

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum