This error occurs when Spring is unable to find a bean of the required type during autowiring. In this case, the error message indicates that the HosUserClassroomController class requires a bean of type SysHosDisService, but Spring is unable to find one.

To fix this error, you need to check that a bean of type SysHosDisService is defined in your Spring configuration. If it is not defined, you need to define it. If it is defined, you need to make sure that it is being scanned and loaded by Spring.

One possible reason for this error is that the package containing the SysHosDisService class is not being scanned by Spring. To fix this, you can add the package containing the SysHosDisService class to the @ComponentScan annotation in your Spring configuration class.

Another possible reason for this error is that the SysHosDisService class is not being instantiated by Spring. To fix this, you can add the @Service annotation to the SysHosDisService class to indicate that it is a service bean that needs to be instantiated by Spring

orgspringframeworkbeansfactoryNoSuchBeanDefinitionException No qualifying bean of type commedicalhospitalauthserviceSysHosDisService available expected at least 1 bean which qualifies as autowire cand

原文地址: https://www.cveoy.top/t/topic/eBws 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录