Hi,
I created an
Angular application with a Spring Boot backend, currently I work locally by running the server on Intellij and the angular App with "ng serve",
I want to deploy my app to Heroku.
I searched on the internet, and I saw that one of the first steps to do that is to build the Angular app and copy the "dist" content to "src/main/resources/static" .
I copied the content, then tried to run the server (still working locally) and access the app from the browser at this address : "http://localhost:3000/" (I defined 3000 as the Spring Boot app port).
Unfortunately, I am not seeing my Angular app, what I am seeing is the "Whitelabel Error Page"
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Sat Nov 09 17:26:21 IST 2019
There was an unexpected error (type=Forbidden, status=403).
Access Denied
I assume that I am getting "access denied" error because I have a "JWTAuthorizationFilter" on my API - consumers of the API must provide a valid json web token in the request header.
But my question is:
What should I do in order to cause the "http://localhost:3000/" return the Angular App and not access the API, what am I missing here?
My App has two controllers (@RestController) , that have a couple of GET\POST\DELETE\PUT requests.
And I configured a JWTAuthenticationFilter and JWTAuthorizationFilter:
I still don't understand how the separation between the angular application and the Spring Rest API is expressed in the
Java spring project deployment.
Can you please help me fix this issue, or guide me where can I find an explaination about this ?