Technology Sharing

SpringBoot Thymeleaf project redirects to another system HTTPS to HTTP

2024-07-06

한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina

The SpringBoot Thymeleaf project is a simple single project with only one page.
The redirection is separated from the front and back, and vue is used on the front end.

The browser sees that https becomes http after redirection, and the F12 console sees 301 Moved Permanently

The initial writing method of a single project: response.sendRedirect(url);

Tried two methods and neither worked.

 1、modelAndView.setView(new RedirectView(url,true,false));