package com.demo;
import .springframework.boot.SpringApplication;
import .springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication(scanBasePackages = {"com.controller"})
public class DemoApplication {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
}
This is my demo package, where the main() locates...
package com.controller;
import .springframework.web.bind.annotation.GetMapping;
import .springframework.web.bind.annotation.RestController;
@RestController
public class AuthController {
@GetMapping(value = "/welcome")
public String welocome() {
return "welcome bro..";
}
}
and this is my controller package, where I put my RestController here.
what actually works under the hood when I declare @SpringBootApplication(scanBasePackages = {"com.controller"})
in my demo package?
I just want to know, what's running behind the scenes..!