Spring batch 如何在spring batch admin用户界面中添加作业描述?

Spring batch 如何在spring batch admin用户界面中添加作业描述?,spring-batch,spring-batch-admin,Spring Batch,Spring Batch Admin,有没有办法在spring batch admin的用户界面上添加作业描述 尽管我试图添加作业描述,但spring batch admin无法支持它。 我想知道spring batch admin是否不支持它。没有现成的功能来显示作业描述。它只包含在XML中,在UI中看到的数据来自JobRepository。您必须扩展UI才能添加该功能。我知道我参加聚会迟到了,但我发现了,它对我来说完美无瑕。你所要做的就是: 在类路径中添加messages.properties文件(在 src/main/reso

有没有办法在spring batch admin的用户界面上添加作业描述

尽管我试图添加作业描述,但spring batch admin无法支持它。
我想知道spring batch admin是否不支持它。

没有现成的功能来显示作业描述。它只包含在XML中,在UI中看到的数据来自JobRepository。您必须扩展UI才能添加该功能。

我知道我参加聚会迟到了,但我发现了,它对我来说完美无瑕。你所要做的就是:

  • 在类路径中添加
    messages.properties
    文件(在 src/main/resources)
  • Add
    yourJobName.description=您的描述放在该文件的此处
  • 通过在路径
    src/main/resources/META-INF/spring/batch/servlet/Override/manager-context.xml上创建文件,覆盖SBA的
    manager-context.xml
  • 上述创建文件的内容应为:
  • `

    
    
    `


    就这样。您的自定义描述将显示在SBA中。希望这对正在寻找它的人有所帮助。

    这应该是公认的答案。你刚刚救了我一天。
    <?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>