简体   繁体   中英

how to login with spring boot and angular 2

I have a Front end application that runs on http:// localhost:5555, with angular 2

On the other hand, I have a Back end application running with spring boot on http:// localhost:8080/, that provide a REST Api for my angular 2 application.

Sending requests from http://localhost:5555/ to http://localhost:8080/ works as well.

what is the best way to authenticate users ,I read so many articles, but I couldn't find a solution.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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