簡體   English   中英

如何使用spring boot和angular 2登錄

[英]how to login with spring boot and angular 2

我有一個在http:// localhost:5555上運行的前端應用程序,角度為2

另一方面,我有一個在http:// localhost:8080 /上運行spring boot的后端應用程序,它為我的angular 2應用程序提供REST Api。

http:// localhost:5555 /發送請求到http:// localhost:8080 /也可以。

什么是對用戶進行身份驗證的最佳方式,我閱讀了很多文章,但我找不到解決方案。

你需要在控制器文件中用@CrossOrigin(origins = "http://localhost:5555")創建交叉@CrossOrigin(origins = "http://localhost:5555")

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM