参考:Sprint Boot 工程中HanLP配置相对路径,始终有问题的解决方案_springboot hanlp-优快云博客
<!--hanlp 依赖-->
<dependency>
<groupId>com.hankcs</groupId>
<artifactId>hanlp</artifactId>
<version>portable-1.8.4</version>
</dependency>

public class ResourceFileIoAdapter implements IIOAdapter {
@Override
public InputStream open(String path) throws IOException {
ClassPathResource resource = new ClassPathResource(path);
// return Files.newIn

最低0.47元/天 解锁文章
1万+

被折叠的 条评论
为什么被折叠?



