文件助手
server {
listen 80;
server_name your_domain.com;
location /api {
proxy_pass http://localhost:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# 添加下面这一行,用于修正路径
proxy_set_header X-Forwarded-Proto $scheme;
# 添加下面这一行,用于修正路径
proxy_set_header X-Forwarded-Path /api;
# 添加下面这一行,用于修正路径
rewrite /api/(.*) /$1 break;
}
# 如果你有其他静态资源或页面,可以在这里配置
location /api {
proxy_pass http://10.10.5.217;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# 如果需要修改请求路径,可以使用rewrite指令
# rewrite ^/api/(.*) /$1 break;
}
}
<dependency>
<groupId>com.luhuiguo</groupId>
<artifactId>aspose-words</artifactId>
<version>23.1</version>
</dependency>
public static void main(String[] args) throws Exception {
String toPath = "file:///F:/file/read/%E5%9C%B0%E4%B8%8B%E5%AE%A4%E6%89%8B%E8%AE%B0/2.html";
Document doc = new Document(toPath);
// doc.acceptAllRevisions();//修订
doc.save("C:\\Users\\h\\Desktop\\book\\4.epub" , SaveFormat.EPUB);
}