Announcement Announcement Module
No announcement yet.
Progtammatic Parameterization Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Progtammatic Parameterization

    I'm trying to find a clean way to turn command line arguments (or the equivalent) into ${xxx} substitutions in some bean definitions.

    It seems surprisingly convoluted to accomplish. I can use the property processor and set the args into system properties, or I can pre-configure the pathname of a property file and write out before loading the bean definitions.

    I keep thinking that there must be a more straightforward idiom here.

  • #2
    System properties are probably the way I would do it. Doesn't seem particularly convoluted to me - most command line users are going to be pretty familiar with -D. Unless I'm missing something?


    • #3
      I found a solution

      I personally find it messy to communicate between components by adding system properties. However, I realized that by using the postprocessor OUTSIDE of the context, I could create it, load it with values, and run it, all under program control.