Announcement Announcement Module
Collapse
No announcement yet.
With a <context:property-placeholder> defined, how can I override values Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • With a <context:property-placeholder> defined, how can I override values

    I have a
    Code:
    <context:property-placeholder>
    defined in my application config with location=classpath*:META-INF/spring/*.properties to pickup all properties files in the META-INF/spring folder on the classpath. That's just the default generated by Roo. In my config, I have beans where I've defined some parameter values to be replaced with properties like ${input.directory}. I'm wondering how I can override those using command line system values.

    So I would perform the following command:

    java -Dinput.directory=/tmp/data/ -jar myjar.jar

    And the ${input.directory} would get replaced by the command line option. It doesn't seem to be working though. I tried setting the system-properties-mode attribute to OVERRIDE with no luck.

    thanks in advance.

  • #2
    Never mind, my own ignorance.

    I didn't realize any -D values had to come after the -jar option.

    Comment

    Working...
    X