Announcement Announcement Module
No announcement yet.
how can I configure the flow-specific message source Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • how can I configure the flow-specific message source

    A file named '' can be positioned inside the flow's working directory to provide flow-specific messages.
    A ReloadableResourceBundleMessageSource is created for that internally.

    Can I somehow configure that message source (e.g. p:useCodeAsDefaultMessage="true") or even specify my own implementation?

  • #2

    Hi tisch,

    if you have a bean-import and it contains a local bean called "messageSource" it will be used instead of the "". Thus you can configure it yourself.



    • #3
      Thank you. This works - but unfortunately not completely as I expected.

      If a messageSource is not explicitly imported into the flow spring automatically creates one with in the same directory as it's basename. It's parent message source is set to be the web application context.
      So, if a message can not be found the parent message source can be asked. If it can not be found there either the root application context is asked.

      In the end I like the fact that a flow-specific in the flow's working directory can be used.
      But if I specify an other message source to be used the hierarchy is broken and the flow-specific is left out.

      What I would like to do is to control which class is used for the automatically created message source and how it is configured.


      • #4
        If you configure your MessageSource be sure to set the parent message source
            <property name="parentMessageSource">
              <ref parent="messageSource"/>
        and give yours the id messageSource! If you want to use the standard way there is no way to set other properties.


        • #5
          Thanks for useful information. It works.