关于Error starting ApplicationContext. To display the conditions report re-run your application with

项目启动报错:
Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.
这个错误的分类很多, 在百度上搜一下可以查出来最少10种错法, 大多数的方案多是在这个方法的实现类上加一个@Service 注解 , 虽然我不懂这个是什么原理, 但是既然有解决方法, 那我就不去找了, 然后我去看我的代码,
我的码, 不愧是我啊diao 我的代码自己都看不懂, 因为我的报错是因为自己引入其他项目的api 然后就报错了, 所以我就去看IDE的报错信息了,
像这样:
关于Error starting ApplicationContext. To display the conditions report re-run your application with
描述信息说是 因为这个api并没有被spring生成bean, 并且无法找到 这个api,
然后给了一个方案:
关于Error starting ApplicationContext. To display the conditions report re-run your application with
就像这样, 它建议我去在配置里定义一个bean , 这个我怎么会想到怎么解决,

在我头要挠破的时候我突然想到一个注解 @ComponentScan 一个神奇的扫包注解,
关于Error starting ApplicationContext. To display the conditions report re-run your application with
像这样, 把扫不到的包给加进去, 而后面那个是我自己的项目本身, 因为我的项目配置了eureka, 所以导致扫不到自身了, 我就把自己给加进来了, 然后在自己的项目中再去实现这个工作流的api
像这个样子:
关于Error starting ApplicationContext. To display the conditions report re-run your application with
实现它的接口, 在启动就没有问题了
关于Error starting ApplicationContext. To display the conditions report re-run your application with
OK 就启动了

我是小宁, 一个不甘于现状而又没有动力去学习的孩子
宁某: 不愧是你啊diao