spring batch admin stop按钮不起作用

我使用spring batch admin来运行spring-batch,除了job "stop" button之外,一切正常 . 它导致一个空页面,这个错误代码 HTTP Status 405 - Request method 'POST' not supported 我不知道为什么它不起作用!

回答(1)

2 years ago

我在旧的Spring批处理论坛找到了解决方案,我需要在我的web.xml中添加这些过滤器

<filter>
<filter-name>shallowEtagHeaderFilter</filter-name>
<filter-class>org.springframework.web.filter.ShallowEtagHeaderFilter</filter-class>
</filter>

<filter>
    <filter-name>hiddenHttpMethodFilter</filter-name>
    <filter-class>org.springframework.web.filter.HiddenHttpMethodFilter</filter-class>
</filter>

<filter-mapping>
    <filter-name>shallowEtagHeaderFilter</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>

<filter-mapping>
    <filter-name>hiddenHttpMethodFilter</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>