繁体   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