Results 1 to 2 of 2

Thread: Web service Spring batch admin , date parser

  1. #1
    Join Date
    Apr 2012
    Posts
    6

    Default 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. #2
    Join Date
    Apr 2012
    Posts
    6

    Default

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •