Have you ever felt frustrated when trying to configure your first Spring project? You want to start developing web apps with Spring MVC but managing all Maven depencies is slowing you down? Not to mention that you’ll soon need a server to get your app running..
I have also spent some long hours, struggling to set up my Spring project workspace along with Tomcat server. And then, during the traing I have attended, I have learnt about SpringBoot and Spring Initializr that makes the whole process easier.
Below you’ll find step by step guide showing how to create your first SpringBoot project using Spring Initializr.
- Go to https://start.spring.io/
- Choose Maven or Gradle Project
- Choose language
- Type your application name
- Search for needed dependencies (or click on Switch to the full version to see all the details)
- When you’re ready, click on generate projectAs you can see I’ve chosen Web dependency as we want to start a web app. According to Spring Initializr choosing Web dependency gives us “Full-stack web development with Tomcat and Spring MVC”
- Now unpack zip folder in your workspace
- Import project to your workspace in Eclipse (File -> Import, then choose Existing Maven project)
- Browse directory for your project
- Check Add project to working set and click on Finish
- Wait till workspace is built… and your project is now ready!Along with POM file:
I hope Spring Initializr will also save some of your time in future 🙂