Announcement Announcement Module
No announcement yet.
Properties in xml configuration of spring integration Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Properties in xml configuration of spring integration


    I want to use properties that I load (from a properties file let's say) using:
    <bean class="org.springframework.beans.factory.config.Pr opertyPlaceholderConfigurer">
    <property name="location" value=""/>

    In some attributes in spring integration ,where you have a type check, I can't seem to use a variable. One example is the period attribute of the schedule element which is expected to be an integer. This prevents me from using a variable like ${poll.period}.

    Is there another way to go around this?


  • #2
    The hard way around would be to define the component as a bean instead of using the namespace. The easy way (for you) would be to convince the developers that the convenience of property placeholders outweighs the safety of type checking in xml.

    If we remove the restriction from the xsd there would be no problem of course.

    Almost completely off-topic: did you check out
    Last edited by iwein; Aug 11th, 2008, 07:38 AM. Reason: using the code tags like a good boy :p


    • #3
      I will try the piece of code you sent.

      So I get from your reply that the easy way (for me) is out of the question?


      • #4
        There is an open issue for this in JIRA, so you can add your vote:


        • #5
          Originally posted by marwan simaan View Post
          So I get from your reply that the easy way (for me) is out of the question?
          No no, as Mark mentioned, we do take you seriously and you're not alone. If pressured to take sides I'd probably side with you on this one.


          • #6
            Also, this same general issue is on the roadmap for the Spring core:

            While losing the type-safety at the level of the XSD is unfortunate, the flexibility of using placeholders for common configuration elements that happen to be numeric or boolean is probably more important.