javaeclipsemavenspring-bootspring-tool-suite

Eclipse Spring Tool Suite add dependencies using GUI after project creation


Every time I start a new Spring Boot project - using Spring Tool Suite and now as STS4 - through Spring Starter Project I can add dependencies using GUI like on the screenshot below.

Adding dependencies in GUI

It's very convenient to choose dependencies in GUI. But sometimes I forget to add some dependencies and have to add them to the pom.xml file manually.

Is it possible to add new dependencies using GUI the same way like during Spring Starter Project configuration after project creation?


Solution

  • Yes, you can. Right click on the pom of the generated project and choose Spring -> Edit Starters from the context-menu. It opens up the same dialog and lets you add additional dependencies.

    You just need to take care of the correct Spring Boot version yourself, it isn't set automatically to the version that you chose when you created the project. It doesn't cause any huge trouble if you choose the wrong version, but spring starter modules might show up that aren't compatible with your project.