Spring Tool Suite
  1. Spring Tool Suite
  2. STS-3311

improve automatic configuration for Spring projects

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: 3.7.2.RELEASE
    • Component/s: None
    • Labels:
      None

      Description

      We should improve the way Spring projects are configured to do more automatically. Most of the times when you import a Maven project, the project configurer, for example, could also auto-configure the Spring configurations of the project. But more ways for auto-configuration could be possible.

        Activity

        Show
        Martin Lippert (c) added a comment - see also the discussion on the forum: http://forum.springsource.org/showthread.php?136286-Automated-(spring)-setup-when-importing-projects
        Hide
        Jens Ohlsson added a comment -

        Any news on this one? I would be really nice to have a working spring setup in place on project import...

        Cheers!
        Jens

        Show
        Jens Ohlsson added a comment - Any news on this one? I would be really nice to have a working spring setup in place on project import... Cheers! Jens
        Hide
        Martin Lippert (c) added a comment -

        We added additional mechanics to auto-configure Spring Boot projects after importing them In addition to that we also added an option to automatically configure @Configuration classes in the project preferences as Spring configs. The last option is disabled by default, it is an experimental implementation and might configure too much at the moment. But feel free to test this a bit.

        Are you looking for something specific beyond this? Would be curious to hear more details.

        Show
        Martin Lippert (c) added a comment - We added additional mechanics to auto-configure Spring Boot projects after importing them In addition to that we also added an option to automatically configure @Configuration classes in the project preferences as Spring configs. The last option is disabled by default, it is an experimental implementation and might configure too much at the moment. But feel free to test this a bit. Are you looking for something specific beyond this? Would be curious to hear more details.
        Hide
        Jens Ohlsson added a comment -

        Hi! Thanks for relying!

        Well, I'm working in this huge, multi-module, spring application which uses xml based spring configuration. For various reasons I need to wipe everything clean from time to time. Right now it takes me like 10 minutes or so to click on all projects and set all config files up, which usually means I don't bother doing it, which is a shame running sts and all .

        Usually, what I (should) do is just go into Project/Properties/Spring/Beans support, push scan, and add all files found (and click support for import). I bet you can have more intricate setups, but this is what I usually do (since I really haven't understood the concept of config sets).

        This process is as I said a bit time consuming having ~50 modules in the project, and could easily be automated.

        Show
        Jens Ohlsson added a comment - Hi! Thanks for relying! Well, I'm working in this huge, multi-module, spring application which uses xml based spring configuration. For various reasons I need to wipe everything clean from time to time. Right now it takes me like 10 minutes or so to click on all projects and set all config files up, which usually means I don't bother doing it, which is a shame running sts and all . Usually, what I (should) do is just go into Project/Properties/Spring/Beans support, push scan, and add all files found (and click support for import). I bet you can have more intricate setups, but this is what I usually do (since I really haven't understood the concept of config sets). This process is as I said a bit time consuming having ~50 modules in the project, and could easily be automated.
        Hide
        Martin Lippert (c) added a comment -

        For this specific use-case I could imagine something like a shortcut for this operation from the Spring context-menu: "Scan and set bean configs...". If triggered, it runs over all selected projects, executes a "scan" and an "add all" operation. What do you think?

        Show
        Martin Lippert (c) added a comment - For this specific use-case I could imagine something like a shortcut for this operation from the Spring context-menu: "Scan and set bean configs...". If triggered, it runs over all selected projects, executes a "scan" and an "add all" operation. What do you think?
        Hide
        Jens Ohlsson added a comment - - edited

        Sounds like a great idea! It would be great if one could select either a top-level, or multiple projects, (or an option to configure it to always run on project import .

        Show
        Jens Ohlsson added a comment - - edited Sounds like a great idea! It would be great if one could select either a top-level, or multiple projects, (or an option to configure it to always run on project import .
        Hide
        Martin Lippert (c) added a comment -

        I marked this with the 3.7.2 release label to keep it on the list of things for that release.

        Show
        Martin Lippert (c) added a comment - I marked this with the 3.7.2 release label to keep it on the list of things for that release.

          People

          • Assignee:
            Martin Lippert (c)
            Reporter:
            Martin Lippert (c)
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              First Response Date: