Reputation: 89
I have a spring boot project that has an angular app integrated into it. The angular is packed into a jar and is made available to the application in the application jar.
The project structure is more or less like this:
It works fine when the context-root is "/". But if I make modifications to the context root from "/" to "/project1" in spring boot configuration file I am no more able to access the frontend.
Could anyone provide any hint how I could fix this problem ?
Upvotes: 0
Views: 843
Reputation: 154
You will need to add a base tag to the head of your index.html
<base href="/project1/">
Link to the docs for further explanation if needed: https://angular.io/docs/ts/latest/guide/router.html#!#base-href
Upvotes: 1
Reputation: 271
I would assume this is because your client app is packaged as a jar, and will thus not register any changes made to the root context.
Upvotes: 0