Main Spring Boot application class Automatically Component scans sub-package

includes "controller" sub package

Any other sub-package you create can give them any name

  1. Default scanning is fine if everything is under
  3. But what about my other package?
    1. com.jbb
    3. code.com4.devops
package com.code4devops.springbootjar;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

public class SpringBootJarApplication {

	public static void main(String[] args) {, args);


Application Properties

  1. By default, Spring Boot Will load properties
  2. Create By Spring Initializr,Empty at the Beginning

Example : Save As

#can add spring boot properties
#Also Add you own custom properties

static Content

  1. by default ,Spring Boot will load static resource from "/static" directory
  2. Examples: of static resource HTML files,CSS,Javascript,image


  • Do Not use the src/main/webapp directory if our application is packaged as a JAR
  • Although this is a standard Maven Directory,it works only with WAR packaing
  • It is silently ignored by most build tools if you generate a JAR


  1. Spring Boot includes auto-configuration for following template engines
    1. FreeMarker
    2. Thymeleaf(is popular template engine)
    3. Mustache
  2. by default ,Spring Boot will load templates from "/templates" directory