Java Spring-boot: Problem to finde resources

I have a Spring-boot backend Angular front end application. The application runs well if it is run on port 4200 (Running frontend from the front end). But I have done the integration an I run in to troubles. The application after the following commands:

mvn clean install
npm install
npm build

Properly generate the dist folder on the front end and copy them in the source folder (project/src/main/resources/static).
When I try to run the application from the back end (definded port 8999) the application finde the index.html file in static folder but cannot find the other scripts. The application start looking for those resources on localhost:8999/resourcefile
instead of looking for it in
localhost:8999/src/main/resources/static

Do anyone have any idea?

Source: Angular

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.