The https protocol becomes http protocol after SpringMVC redirection

The protocol of the previous project was still http. After it was changed to https, this problem occurred.

Service access address: https://wuxinke.demo.com
 

The address to access a certain page: https://wuxinke.demo.com/aps/judgeProviderOrCtenant.ht
After being redirected by SpringMVC, the address becomes http://wuxinke.demo.com/aps/judgeProviderOrCtenant.ht

Solution: Add redirectHttp10Compatible to the spring.xml view parsing configuration

<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
   <property name="prefix" value="/WEB-INF/views" />
   <property name="suffix" value=".jsp" />
   <property name="redirectHttp10Compatible" value="false"/>
</bean>

Guess you like

Origin blog.csdn.net/weixin_51689532/article/details/132534478