質問

Is there any way to add the description of job at the user interface of spring batch admin?

Although, I tried to added the description of the job, spring batch admin cannot support it. I would like to know that whether spring batch admin does not support it or not.

役に立ちましたか?

解決 2

There isn't the ability out of the box to display the job's description. That is only contained in the XML and the data seen in the UI comes from the JobRepository. You'd have to extend the UI to add that functionality.

他のヒント

I know i'm late to the party but I figured it out and it works flawlessly for me. All you have to do is :

  1. Add a messages.properties file in your classpath (under src/main/resources).
  2. Add yourJobName.description=Your description goes here in that file.
  3. Override manager-context.xml for SBA by creating a file on path src/main/resources/META-INF/spring/batch/servlet/override/manager-context.xml
  4. The content of the above created file should be :

`

<?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>

`

That's it. Your custom description shows up in SBA. Hope this helps someone who's looking for it.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top