两个解决方法
1.pom.xml里添加配置
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>**/*.*</include>
</includes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
2.application.yml 添加路径
# 训练数据文件夹的路径
tess4j:
datapath: classpath:/tessdata