Announcement Announcement Module
Collapse
No announcement yet.
JobParameters late binding + default properties binding Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JobParameters late binding + default properties binding

    Hi,

    I have below bindings in my reader:

    @Value("#{jobParameters['testParam']?:'defaultValue'}")
    private String testParam;


    "defaultValue" will be set when no 'testParam' specified in command line.

    Then I put the "defaultValue" in my .properties files:

    myapp.testParam=defaultValue

    and import it with:
    <contextroperty-placeholder location="classpath*:My.properties" />

    question is:

    How to write the EL to make it work?

    I've tried @Value("#{jobParameters['testParam']?:${myapp.testParam}}")

    But does not works.

    Thanks
    Ma Ling
Working...
X