gpt4 book ai didi

java - 在 Java Spring 框架中链接到 Facebook 等外部网站

转载 作者:行者123 更新时间:2023-12-01 12:04:12 25 4
gpt4 key购买 nike

我是 Java Spring 框架的新手。我使用 Controller 设置 URL 以连接到其他页面,例如:

@RequestMapping(value = "loginMember")

但是如果我想设置一个链接到特定网站(例如 www.facebook.com)怎么办?我该怎么办?

请帮助我,谢谢。

最佳答案

你可以使用这个

 @RequestMapping(value = "/redirect", method = RequestMethod.GET)
public ModelAndView method() {
return new RedirectView("redirect: the URL you want");

}

关于java - 在 Java Spring 框架中链接到 Facebook 等外部网站,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27762726/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com