Application entry point

Our application entry point will be named BookStoreApplication and will be BookstoreApplication.java:

package pl.finsys.example; 
 
import org.springframework.boot.SpringApplication; 
import org.springframework.boot.autoconfigure.SpringBootApplication; 
 
@SpringBootApplication 
public class BookstoreApplication { 
 
    public static void main(final String[] args) { 
        SpringApplication.run(BookstoreApplication.class, args); 
    } 
} 

That's it. The whole nine lines of code, not counting blank lines. It could not be more concise. The @SpringBootApplication is a kind of shortcut annotation, which is very convenient. It replaces all of the following annotations:

  • @Configuration: A class marked with this annotation becomes a source of bean ...

Get Docker and Kubernetes for Java Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.