By default, Spring Boot scans for components in the package where your application class is located, or sub-packages. Since com.in28minutes.springboot.web.controller is not a sub-package of com.in28minutes.springboot.web.springbootfirstwebapplication, it is not scanned for components.
I suggest you get rid of the package where your application class is located right now, and move it to com.in28minutes.springboot.web.
posted 1 year ago
Hey! Thanks. It works.
You ridiculous clown, did you think you could get away with it? This is my favorite tiny ad!
Devious Experiments for a Truly Passive Greenhouse!