The simplest way to set up your first project for Spring web app

Hi!

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.

  1. Go to https://start.spring.io/1. Go to Spring Initializr
  2. Choose Maven or Gradle Project
  3. Choose language
  4. Type your application name
  5. Search for needed dependencies (or click on Switch to the full version to see all the details)
  6. When you’re ready, click on generate project2. Generate your 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”
  7. Now unpack zip folder in your workspace
  8. Import project to your workspace in Eclipse (File -> Import, then choose Existing Maven project)3. Import Existing Maven Project
  9. Browse directory for your project4. Browse for your project
  10. Check Add project to working set and click on Finish5. Finish importing
  11. Wait till workspace is built… and your project is now ready!6. Imported project is ready to useAlong with POM file:7. Pom is generated

I hope Spring Initializr will also save some of your time in future 🙂

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s