Caused by: java.io.FileNotFoundException: class path resource [AsyncConfig.class] cannot be opened because it does not exist
Caused by: java.io.FileNotFoundException: class path resource [AsyncConfig.class] cannot be opened because it does not exist
一、问题现象
在 Spring Cloud 工程进行 install 或者启动模块服务的时候,出现了如下报错:
Caused by: java.io.FileNotFoundException: class path resource [AsyncConfig.class] cannot be opened because it does not exist
java.lang.IllegalStateException: Unable to read meta-data for class AsyncConfig
二、问题原因
通过查看代码,可以看到是存在 AsyncConfig.java 的。
但是,在配置文件中没有配置该类的完整路径,导致类没有找到。
三、解决方案
在配置文件中配置完整的路径即可,如下所示: