1. Problem
When I access the REST API, the Tomcat server didn't receive any request, my client code was responded with 'Server redirected too many times' error.
2. Analysis
This issue happened after our F5 applying, we configured https in Tomcat before, now we removed it from server.xml, as F5 can handle the SSL session.
At last I found that I forgot to remove the https configuration in spring security configuration.
<http pattern="/api/**" auto-config="true">
<intercept-url pattern="/**" access="ROLE_API" requires-channel="https"/>
<http-basic/>
</http>
Once i removed requires-channel="https", this error is gone.