Announcement Announcement Module
Collapse
No announcement yet.
Web service Spring batch admin , date parser Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Web service Spring batch admin , date parser

    hi,

    I decided to use spring batch admin (SBA) in order to manage my batches. My target is to implement mobile application to control my batches.
    So I've made a json client to request SBA webservice. All is working except date format.
    Json message contains a start time using"hh:mm:ss" format :
    "4" : {
    "status" : "STOPPED",
    "startTime" : "08:40:48",
    "duration" : "00:04:51",
    ....
    }
    but i would like to have a "aaaa-mm-dd hh:mm:ss" style as data base recorder.

    How can I configure the json format ? Or have you any other idea ?

    Thanks a lot :-)

    Yo,
    France

  • #2
    hi,

    After a lot of search, I've found a solution ! The json message is prepared on
    "spring-batch-admin-manager/src/main/resources/org/springframework/batch/admin/web/manager/jobs/json/executions.ftl". So i add my attribute which is present at a "JobExecutionInfo" class, like the other.
    Now this .ftl file looks like :
    Code:
     .... "startTime" : "${jobExecutionInfo.startTime}",
    	    "startDate " : "${jobExecutionInfo.startDate }",
                "duration" : "${jobExecutionInfo.duration}",....
    And it's working ! the json message contains the startDate with "aaaa-mm-dd" format !

    I hope it will be useful for anybody :-)

    Regards,

    Yo

    Comment

    Working...
    X