Uploaded image for project: 'Spring Tool Suite'
  1. Spring Tool Suite
  2. STS-1529

Provide quickfix to quickly create @Autowired constructor for class with final fields

    XMLWordPrintable

    Details

      Description

      The latest M1 release for STS 2.6.0 contains a new feature of adding @Autowired to a constructor using the quick fix feature. Would be cool, if you could take that even one step further by offering an option to generate a constructor for all final fields of a class and annotate with @Autowired in one go:

      public class MyService {
      
        private final MyFooRepo fooRepo;
        private final MyBarRepo barRepo;
      
      }
      

      Currently this requires to let Eclipse generate the constructor for the fields and triggering the quick fix newly introduced.

        Attachments

          Activity

            People

            Assignee:
            kaitlinsherwood Kaitlin Duck Sherwood
            Reporter:
            ogierke Oliver Gierke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: