Comments (5)
这个不怪作者,这个是你们的项目没有过滤字符集。亲测
from swagger2word.
我的理解是这个程序处理的是json文件而已,json里的中文并没有乱码,经过程序处理之后页面上对应的中文变成乱码了
from swagger2word.
在 word.xml (src\main\resources\templates\word.html) 文件里添加编码方式 charset=utf-8
<meta http-equiv="Content-Type" content="application/msword; charset=utf-8"/> // 这里末尾添加
<title>toWord</title>
<style type="text/css">
from swagger2word.
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
在pom文件 properties节点 添加一下字符集的配置试试,我是win10 64的环境,可以解决
from swagger2word.
如果是在IDEA直接运行工程,IDEA会自动加入JVM参数-Dfile.encoding=UTF-8 -jar
,中文不会乱码
打包成的话,运行前也加入此参数即可:
java -jar -Dfile.encoding=UTF-8 Swagger2Word-exec.jar
from swagger2word.
Related Issues (20)
- 字段是否必填(可加两行代码) HOT 1
- 我的怎么就不行
- 无法识别"$ref"索引的模板 HOT 1
- 多模型嵌套的时候无法导出子对象里面的属性字段 HOT 2
- 无法识别allOf 定义的基类字段
- like #47 said Parameter require=true configuration not resolved.(default=false)
- response为String时无显示,datatype的string首字母必须大写,否则不能正常显示
- 请求对象body里面的参数没有识别出必填和非必填
- 三种都试了 还是报错 HOT 1
- OpenApiWordServiceImpl 类代码有两处异常链丢失,可以改进
- 兼容OpenApi3 HOT 1
- 如何处理多级字段多列表展示问题
- 字段长度展示问题解决方案
- 1年多了, 这项目还会更新嘛
- Docker support?
- 在线版swagger转word文档,支持swagger3.0哦!
- 只有请求参数没有返回参数 HOT 1
- 支持3.0的版本开源了 HOT 1
- 这个工具怎么用啊,摸索了一圈竟然不知道从哪里入手!!!请问有使用文档吗? HOT 5
- this::response中的this指的是什么
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swagger2word.