简体   繁体   English

如何有效地构建 angular 和 spring boot 应用程序

[英]how to efficiently build angular and spring boot app

I am trying to build a spring boot/angular app.我正在尝试构建一个 spring boot/angular 应用程序。 I want to run it locally while building the front end login/logout flow.我想在构建前端登录/注销流程时在本地运行它。 So I have angular running on 4200 and spring boot running on 8080. The problem is that when I login from angluar the re-direct url etc points back to 8080. Is there a simple way that I can run spring boot and angular on the same port and have the front refresh everytime I make a change to a file like what is happening now with "ng serve"所以我在 4200 上运行 angular,在 8080 上运行 spring boot。问题是,当我从 angluar 登录时,重定向 url 等指向 8080。有没有一种简单的方法可以让我同时运行 spring boot 和 angular端口并在每次我对文件进行更改时进行前端刷新,就像现在使用“ng serve”所做的那样

No.不。

You cannot use the same port for two different processes in any circumstances.在任何情况下都不能将同一个端口用于两个不同的进程。 You should best change the redirect address as Henry recommended.您最好按照 Henry 的建议更改重定向地址。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM