Spring的DispatcherServlet
servlet有时会调用GET
请求而不是POST
请求。它必须始终按照JSP表单POST
调用method="post"
方法。
(DispatcherServlet.java:823) - DispatcherServlet with name 'springmvc' processing GET request for [/change.do]
所有配置都是正确的。我在网上检查和搜索。对此没有正确的答案。
我正在使用:
<spring.version>3.2.3.RELEASE</spring.version>
<spring.security.version>3.1.4.RELEASE</spring.security.version>
我使用了大量的Spring过滤器和Tomcat 6.0。
<security:custom-filter position="PRE_AUTH_FILTER" ref="siteminderFilter" />
为什么Spring的DispatcherServlet
servlet偶尔调用GET
方法而不是POST
方法?它调用POST
的时间的90%是正确的,但是对于具有GET
的任何表单,它调用method="post"
方法的时间为10%。
Tomcat调试日志:
2017-01-27 11:30:08,811 [TP-Processor19] DEBUG (AntPathRequestMatcher.java:116) - Checking match of request : '/change.do'; against '/*.do'
2017-01-27 11:30:08,812 [TP-Processor19] DEBUG (AbstractSecurityInterceptor.java:194) - Secure object: FilterInvocation: URL: /change.do; Attributes: [IS_AUTHENTICATED_REMEMBERED]
2017-01-27 11:30:08,814 [TP-Processor19] DEBUG (AbstractSecurityInterceptor.java:310) - Previously Authenticated: org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationToken@a24fd89f: Principal: ...@fdf65be0: Username: ABS; Password: [PROTECTED]; Enabled: true; AccountNonExpired: true; credentialsNonExpired: true; AccountNonLocked: true; Granted Authorities: Admin; Credentials: [PROTECTED]; Authenticated: true; Details: org.springframework.security.web.authentication.WebAuthenticationDetails@59b2: RemoteIpAddress: 10.4.89.65; SessionId: null; Granted Authorities: Admin
2017-01-27 11:30:08,815 [TP-Processor19] DEBUG (AffirmativeBased.java:65) - Voter: org.springframework.security.access.vote.RoleVoter@4c019ea6, returned: 0
2017-01-27 11:30:08,817 [TP-Processor19] DEBUG (AffirmativeBased.java:65) - Voter: org.springframework.security.access.vote.AuthenticatedVoter@7e56cb45, returned: 1
2017-01-27 11:30:08,818 [TP-Processor19] DEBUG (AbstractSecurityInterceptor.java:215) - Authorization successful
2017-01-27 11:30:08,820 [TP-Processor19] DEBUG (AbstractSecurityInterceptor.java:227) - RunAsManager did not change Authentication object
2017-01-27 11:30:08,821 [TP-Processor19] DEBUG (FilterChainProxy.java:323) - /change.do reached end of additional filter chain; proceeding with original chain
2017-01-27 11:30:08,823 [TP-Processor19] DEBUG (DispatcherServlet.java:823) - DispatcherServlet with name 'springmvc' **processing GET request** for [/change.do]