Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-4584 Upgrade to spring 4.x
  3. TRUNK-4607

An upgrade to 4.x suggests replacement of SimpleFormController to rather annotated controllers

    Details

    • Complexity:
      Medium

      Description

      Earlier releases of Spring 3.x deprecated SimpleFormController implying that it was about to be removed, It looks like it has been this time round with an upgrade to 4.1.4-RELEASE as pointed out; "All deprecated packages, and many deprecated classes and methods have been removed with version 4.0" at http://docs.spring.io/spring/docs/current/spring-framework-reference/html/new-in-4.0.html

      Currently we took the approach to copy over the spring 3 classes into OpenMRS to continue to support SimpleFormControllers.

      The work needed in the longer run may be to replace all references to SimpleFormController in our code with Spring Annotation Based Controllers. There are lots of documents on the web on how to do this necessary replacements such as: http://java.dzone.com/articles/converting-spring

      However, we are also migrating away from the old interface so it is more likely that we will simply discard old controllers at some point.

      Examples of such classes are:

      1. web/src/test/java/org/openmrs/web/controller/encounter/EncounterTypeListControllerTest.java
      2. web/src/main/java/org/openmrs/web/controller/form/FieldListController.java
      3. web/src/main/java/org/openmrs/web/controller/patient/TribeFormController.java
      4. web/src/main/java/org/openmrs/web/controller/person/PersonDashboardController.java
      5. web/src/main/java/org/openmrs/web/controller/form/AuditFieldController.java
      6. web/src/main/java/org/openmrs/web/controller/form/FieldTypeFormController.java
      7. web/src/main/java/org/openmrs/web/controller/maintenance/ServerLogController.java
      8. web/src/main/java/org/openmrs/web/controller/maintenance/ImplementationIdFormController.java
      9. web/src/main/java/org/openmrs/web/controller/concept/ConceptDrugListController.java
      10. web/src/main/java/org/openmrs/web/controller/concept/ProposeConceptFormController.java
      11. web/src/main/java/org/openmrs/module/web/controller/ModulePropertiesFormController.java
      12. web/src/main/java/org/openmrs/web/controller/concept/ConceptClassFormController.java
      13. web/src/main/java/org/openmrs/web/controller/concept/ConceptDatatypeFormController.java
      14. web/src/main/java/org/openmrs/web/controller/concept/ConceptSourceListController.java
      15. web/src/main/java/org/openmrs/web/controller/form/FormListController.java
      16. web/src/main/java/org/openmrs/web/controller/patient/PatientListController.java
      17. web/src/main/java/org/openmrs/web/controller/program/StateConversionListController.java
      18. web/src/main/java/org/openmrs/web/controller/user/PrivilegeFormController.java
      19. web/src/main/java/org/openmrs/web/controller/program/ProgramFormController.java
      20. web/src/main/java/org/openmrs/web/controller/encounter/EncounterTypeListController.java
      21. web/src/main/java/org/openmrs/web/controller/hl7/Hl7SourceListController.java
      22. web/src/main/java/org/openmrs/web/controller/patient/PatientIdentifierTypeListController.java
      23. web/src/main/java/org/openmrs/web/controller/person/RelationshipTypeListController.java
      24. web/src/main/java/org/openmrs/web/controller/provider/ProviderAttributeTypeListController.java
      25. web/src/main/java/org/openmrs/web/controller/visit/VisitAttributeTypeListController.java 
      26. web/src/main/java/org/openmrs/web/controller/visit/VisitTypeListController.java 
      27. web/src/main/java/org/openmrs/notification/web/controller/AlertListController.java
      28. web/src/main/java/org/openmrs/scheduler/web/controller/SchedulerListController.java
      29. web/src/main/java/org/openmrs/web/controller/concept/ConceptDrugFormController.java
      30. web/src/main/java/org/openmrs/web/controller/concept/ConceptSourceFormController.java
      31. web/src/main/java/org/openmrs/web/controller/encounter/EncounterTypeFormController.java
      32. web/src/main/java/org/openmrs/web/controller/encounter/LocationFormController.java 
      33. web/src/main/java/org/openmrs/web/controller/person/RelationshipTypeFormController.java 
      34. web/src/main/java/org/openmrs/web/controller/person/RelationshipTypeViewFormController.java
      35. web/src/main/java/org/openmrs/web/controller/provider/ProviderAttributeTypeFormController.java 
      36. web/src/main/java/org/openmrs/web/controller/user/RoleFormController.java 
      37. web/src/main/java/org/openmrs/web/controller/user/RoleListController.java
      38. web/src/main/java/org/openmrs/web/controller/visit/VisitAttributeTypeFormController.java
      39. web/src/main/java/org/openmrs/notification/web/controller/AlertFormController.java
      40. web/src/main/java/org/openmrs/scheduler/web/controller/SchedulerFormController.java
      41. web/src/main/java/org/openmrs/web/controller/observation/PersonObsFormController.java 
      42. web/src/test/java/org/openmrs/web/controller/encounter/LocationFormControllerTest.java
      43. web/src/main/java/org/openmrs/web/controller/program/ProgramListController.java
      44. web/src/main/java/org/openmrs/web/controller/patient/MergePatientsFormController.java
      45. web/src/main/java/org/openmrs/web/controller/patient/PatientIdentifierTypeFormController.java
      46. web/src/main/java/org/openmrs/web/controller/person/PersonAttributeTypeFormController.java
      47. web/src/main/java/org/openmrs/web/controller/ForgotPasswordFormController.java
      48. web/src/main/java/org/openmrs/web/controller/concept/ConceptClassListController.java
      49. web/src/main/java/org/openmrs/web/controller/concept/ConceptDatatypeListController.java
      50. web/src/main/java/org/openmrs/web/controller/concept/ConceptProposalListController.java
      51. web/src/main/java/org/openmrs/web/controller/encounter/LocationListController.java
      52. web/src/main/java/org/openmrs/web/controller/form/FieldFormController.java
      53. web/src/main/java/org/openmrs/web/controller/form/FieldTypeListController.java
      54. web/src/main/java/org/openmrs/web/controller/hl7/HL7SourceFormController.java
      55. web/src/main/java/org/openmrs/web/controller/maintenance/GlobalPropertyController.java
      56. web/src/main/java/org/openmrs/web/controller/program/StateConversionFormController.java
      57. web/src/main/java/org/openmrs/web/controller/user/PrivilegeListController.java
      58. web/src/main/java/org/openmrs/web/controller/visit/VisitTypeFormController.java
      59. web/src/main/java/org/openmrs/web/controller/concept/ConceptProposalFormController.java
      60. web/src/main/java/org/openmrs/web/controller/program/WorkflowFormController.java
      61. web/src/main/java/org/openmrs/web/controller/form/FormFormController.java 
      62. web/src/main/java/org/openmrs/web/controller/observation/ObsFormController.java
      63. web/src/main/java/org/openmrs/web/controller/encounter/EncounterFormController.java 
      64. web/src/main/java/org/openmrs/web/controller/ConceptStatsFormController.java 
      65. web/src/main/java/org/openmrs/web/controller/person/AddPersonController.java 
      66. web/src/main/java/org/openmrs/web/controller/concept/ConceptStopWordFormController.java
      67. web/src/main/java/org/openmrs/web/controller/OptionsFormController.java
      68. web/src/main/java/org/openmrs/module/web/controller/ModuleListController.java
      69. web/src/main/java/org/openmrs/web/controller/person/PersonFormController.java
      70. web/src/main/java/org/openmrs/web/controller/ConceptFormController.java
      71. web/src/main/java/org/openmrs/web/controller/patient/PatientFormController.java
      

      Reproduce:
      Currently with the change of the spring version in the parent pom file, all these classes get syntax error mappings

        Attachments

          Activity

            People

            • Assignee:
              kristopherschmidt Kristopher Schmidt
              Reporter:
              k.joseph Kaweesi Joseph
              Designated Committer:
              Rafal Korytkowski
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: