有没有办法在spring batch admin的用户界面添加job的描述?
虽然,我尝试添加作业的描述,但 spring batch admin 无法支持它。我想知道spring batch admin是否不支持。
有没有办法在spring batch admin的用户界面添加job的描述?
虽然,我尝试添加作业的描述,但 spring batch admin 无法支持它。我想知道spring batch admin是否不支持。
我知道我参加聚会迟到了,但我想通了,它对我来说完美无缺。您所要做的就是:
messages.properties
文件(在 src/main/resources 下)。yourJobName.description=Your description goes here
该文件。manager-context.xml
通过在路径上创建文件覆盖SBAsrc/main/resources/META-INF/spring/batch/servlet/override/manager-context.xml
`
<?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 才能添加该功能。