idea报错 Consider defining a bean of type ‘xx.PeopleService‘ in your configuration.

Problem Description

error message

solution:

Add in the startup class: @SpringBootApplication(scanBasePackages={"com.example.chart2.controller", "com.example.chart2.service"})
contains the packages you need to scan

Guess you like

Origin blog.csdn.net/sunxiaohong__/article/details/125290869