JUGLviv

Meta


Share on:


#ProjectFromScratch: SpringBoot – Part2

JUG LvivJUG Lviv

Hence I decided to create web application then there are two good options for quick start  SpringBoot or Spark

Spark is much simpler but SpringBoot brings Spring – I would say Spring is musthave framework nowdays so that my choice is SpringBoot. 
Following GettingStarted doc I’m creating two classes in web module: config called Application.java and our hello world controller HelloController.java
Usually I create package config for configs and package controller for controllers.
Except created classes we need add required SpringBoot dependency
Add to parent pom dependency management section in following way

and add to pom.xml in web module dependency itself

Now you can check if source is compilable with command mvn clean compile and run main on Application.java When you run main, embedded tomcat will start and listen port 8080. Check it with calling url http://localhost:8080

Bitnami