SpringBoot startup exception [Consider defining a bean of type] solution

An exception was reported during startup. Consider defining a bean of type'xxx' in your configuration.

Exception reason: @Component is not added, resulting in not being detected

Solution: add [@Component] annotation to the class

As shown:
Insert picture description here
Insert picture description here

Guess you like

Origin blog.csdn.net/qq_42258975/article/details/109208724