Uploaded image for project: 'Ranger'
  1. Ranger
  2. RANGER-2107

Use Spring to inject DAOs

    XMLWordPrintableJSON

Details

    • Patch

    Description

      Currently, instead of relying on Spring to inject the DAOs internally, Ranger use a RangerDaoManager to create and acquire objects, which lead to a lot of unnecessary generic code which complicates the code.
       Instead of this, all the 'DAO' needs a simple '@Service' annotation, and RangerBaseModelService.entityDao and AbstractBaseResourceService.entityDao can be marked as @Autowired - and Spring will do her job. (Spring before <4.0 were unable to autowire fields based on the generic parameters).
      Later all the RangerDaoManagerBase method could be removed.

      Attachments

        1. RANGER-2107-2.patch
          82 kB
          Zsombor Gegesy

        Activity

          People

            zsombor Zsombor Gegesy
            zsombor Zsombor Gegesy
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: