O'Reilly logo

Learning Spring Boot 2.0 - Second Edition by Greg L. Turnquist

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Running a Spring Boot application

The fabulous https://start.spring.io website created a tiny class, LearningSpringBootApplication, as shown here:

    package com.greglturnquist.learningspringboot; 
 
    import org.springframework.boot.SpringApplication; 
    import      org.springframework.boot.autoconfigure.SpringBootApplication; 
 
    @SpringBootApplication 
    public class LearningSpringBootApplication { 
 
      public static void main(String[] args) { 
        SpringApplication.run( 
          LearningSpringBootApplication.class, args); 
      } 
    } 

This preceding tiny class is actually a fully operational web application!

  • The @SpringBootApplication annotation tells Spring Boot, when launched, to scan recursively for Spring components inside this package and register them. It also tells Spring Boot ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required