# Packaging war (spring boot + angular )

**URL:** <https://devforum.okta.com/t/packaging-war-spring-boot-angular/11497>\
**Category:** Questions\
**Tags:** java, angular\
**Created:** [October 26, 2020, 3:22pm UTC](https://devforum.okta.com/t/packaging-war-spring-boot-angular/11497 "2020-10-26T15:22:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![mohamedberrahal](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@mohamedberrahal](https://devforum.okta.com/u/mohamedberrahal)\
**Post date:** [October 26, 2020, 3:22pm UTC](https://devforum.okta.com/t/packaging-war-spring-boot-angular/11497/1 "2020-10-26T15:22:13Z")

</div>

hello community

I am asking you for a problem okta  
when I package the fornt (angular) application with the spring boot backend ,  
I redirected myself to the okta login page , but when I connect correctly in okta  
Ihave error 404  
here is my configuration.

is there anyone who can help me

![image](https://global.discourse-cdn.com/oktadev/original/2X/d/d6de2551f45099bfbabf8489aec214474752f3b0.png)

![image](https://global.discourse-cdn.com/oktadev/original/2X/5/56c6a8cc3b2f361077203feb6027a1f2dbb639eb.png)

 ![image](https://global.discourse-cdn.com/oktadev/original/2X/7/7ae9a97b893273a969078c1bdf166db8ac3b27a3.png)

 ![image](https://global.discourse-cdn.com/oktadev/original/2X/e/e687fc812c90b9a97d566430694d16cf194a5897.png)

 ![image](https://global.discourse-cdn.com/oktadev/original/2X/f/f59d0fe3af9837b8824cee511e53190b6233b2fe.png)

 ![image](https://global.discourse-cdn.com/oktadev/original/2X/0/0de05426a66133cbb262447bf204118702c0366d.png)

---

<div class="post-metadata">

**Author:** ![mraible](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/mraible/32/37_2.png) [@mraible](https://devforum.okta.com/u/mraible)\
**Post date:** [October 26, 2020, 3:52pm UTC](https://devforum.okta.com/t/packaging-war-spring-boot-angular/11497/2 "2020-10-26T15:52:42Z")

</div>

It looks like you don’t have a controller mapped to `/liris/authSuccess`.

---

<div class="post-metadata">

**Author:** ![mohamedberrahal](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@mohamedberrahal](https://devforum.okta.com/u/mohamedberrahal)\
**Post date:** [October 26, 2020, 3:59pm UTC](https://devforum.okta.com/t/packaging-war-spring-boot-angular/11497/3 "2020-10-26T15:59:45Z")

</div>

Hi matt , /liris is the context of project spring boot  
 ![image](https://global.discourse-cdn.com/oktadev/original/2X/a/a51fab4bbe1cd31c310e2d1bbaffa203b9c830af.png)  
/authSuccess is mapped in front with OktaCallbackComponent ( implicit flow )

i dont have controller authSuccess

---

<div class="post-metadata">

**Author:** ![mohamedberrahal](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@mohamedberrahal](https://devforum.okta.com/u/mohamedberrahal)\
**Post date:** [October 26, 2020, 4:14pm UTC](https://devforum.okta.com/t/packaging-war-spring-boot-angular/11497/4 "2020-10-26T16:14:30Z")

</div>

knowing that when I deploy fornt in localhost:4200 and backend localhost:8080/liris don’t have any probleme everything works well

---

<div class="post-metadata">

**Author:** ![mraible](https://sea1.discourse-cdn.com/oktadev/user_avatar/devforum.okta.com/mraible/32/37_2.png) [@mraible](https://devforum.okta.com/u/mraible)\
**Post date:** [October 26, 2020, 5:16pm UTC](https://devforum.okta.com/t/packaging-war-spring-boot-angular/11497/5 "2020-10-26T17:16:17Z")

</div>

If you combine your apps and want them running on the same port, you’ll need to configure Spring Boot to serve up your SPA and make sure most URLs point to `index.html`. This Stack Overflow question shows you how to do this.

> <https://stackoverflow.com/questions/40769200/configure-spring-boot-for-spa-frontend>

If you haven’t combined your Spring Boot and Angular app, this blog post shows you how to do it.

> **[Angular + Docker with a Big Hug from Spring Boot](https://developer.okta.com/blog/2020/06/17/angular-docker-spring-boot#combine-your-angular-spring-boot-app-into-a-single-jar)**
>
> Use Docker to build & deploy an Angular app! Includes how to combine Angular + Spring Boot into a JAR, dockerize it, and deploy to Knative + Cloud Foundry.

---

<div class="post-metadata">

**Author:** ![mohamedberrahal](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@mohamedberrahal](https://devforum.okta.com/u/mohamedberrahal)\
**Post date:** [October 27, 2020, 10:28am UTC](https://devforum.okta.com/t/packaging-war-spring-boot-angular/11497/6 "2020-10-27T10:28:15Z")

</div>

thank you for your response , yes i have configured Spring Boot to serve up SPA . it’s going well 😀

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/oktadev/original/1X/589c4c5f80de422d01f47cee7185a7fb8227835c.png) [@system](https://devforum.okta.com/u/system)\
**Post date:** [January 26, 2024, 11:31pm UTC](https://devforum.okta.com/t/packaging-war-spring-boot-angular/11497/7 "2024-01-26T23:31:34Z")

</div>

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.
