新导入的项目启动的时候报错Service could not be found.
是引入其他模块的service,但是在另一个模块正常启动,也加入了@FeignClient注解 实现类也有@RequestMapping注解
模块的Endpoints也能找到相关的service存在
@RequestMapping("/shortMessageService")
public class ShortMessageServiceImpl implements ShortMessageService {
@FeignClient(value = "service", path = "/service/shortMessageService")
@SpringBootApplication
@EnableDiscoveryClient
@EnableFeignClients({"com"})
@ComponentScan(basePackages = {"com","com.api"})
public class ServiceApplication {
启动错误
***************************
APPLICATION FAILED TO START
***************************
Description:
A component required a bean of type 'ShortMessageService' that could not be found.
Action:
Consider defining a bean of type 'ShortMessageService' in your configuration.
Process finished with exit code 0
包扫描也加了,重新打包好几次 还是不可以,希望有帮忙解决一下
第一个图里面,注解换成@Service,括号里面的可以不要