Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-4097

Move message properties files out of the web layer

    XMLWordPrintable

    Details

      Description

      The message properties files are located in the web layer under the WEB-INF directly, this should not be the case because these messages are not available to an API consumer and also are not available in unit tests. It is also partly the reason why in applicationContext-service.xml we have this configuration where the messages mutableResourceBundleMessageSource bean references resources under WEB-INF which is technically wrong.

      Suggested solution:

      • In the applicationContext-service.xml file, change the message properties file entries for the bean with id mutableResourceBundleMessageSource from something like /WEB-INF/module_messages to module_messages(or classpath:module_messages)
      • Change the module engine from copying over message properties files to the WEB-INF directory, this is because they are already packaged inside the jar file so spring will be loading them from the classpath, this means modules will no longer need to define message.properties files in the config.xml file

      Extra Credit:

      • As part of this ticket, it would be nice to split the messages.properties files into web and api, it will be near to impossible to pick which codes go where but for the start, we can move all codes to the api messages file but going forward, we will be adding those specific to the web in the web file while rest will be added to the api file. The web file goes in WEB-INF and the api file should reside in api/src/main/resources

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                dkayiwa Daniel Kayiwa
                Reporter:
                wyclif Wyclif Luyima
                Votes:
                0 Vote for this issue
                Watchers:
                14 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - 1 day
                    1d
                    Remaining:
                    Remaining Estimate - 1 day
                    1d
                    Logged:
                    Time Spent - Not Specified
                    Not Specified