是否有办法在spring批管理的用户界面添加作业描述?
虽然我尝试添加作业的描述,但是spring批处理管理员不支持。我想知道spring batch admin是否不支持
我知道我迟到了,但我发现它对我来说是完美的。你所要做的就是:
- 在你的类路径下添加一个
messages.properties
文件src/main/资源)。 在文件中添加 - 通过在路径
src/main/resources/META-INF/spring/batch/servlet/override/manager-context.xml
上创建文件来覆盖SBA的manager-context.xml
- 上面创建的文件的内容应该是:
yourJobName.description=Your description goes here
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<!-- Override messageSource bean in order to provide custom text content -->
<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource">
<property name="basename" value="messages" />
</bean>
</beans>
就是这样。您的自定义描述显示在SBA中。
没有显示职位描述的功能。它只包含在XML中,UI中看到的数据来自JobRepository。您必须扩展UI以添加该功能。