报错:
@Autowired
private RdiMesService rdiMesService;
2023-06-13 17:14:12.852 WARN 23308 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'rdiMesController': Unsatisfied dependency expressed through field 'rdiMesService'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.ruoyi.rdimes.service.RdiMesService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
解决办法
可能是实现类没有加@Servcie注解
@Service
public class RdiMesServiceImpl implements RdiMesService {
//@Value("${sjh.rdi.mes.test}")
private String rdiMesTest="1";//测试开关{1:测试;0非测试,正式接口}