swagger 汉化

无意间发现大家对中文还是情有独钟,于是帮大家搜索了一下汉化的方式,十分简单!

在resources资源文件夹下新建swagger-ui.html文件,放入一下内容即可,重启项目看效果!

下面这个内容复制来源于swagger源码中的swagger-ui.html,只是引用了汉化引用。不用太多关注其内容.

html>


    charset="UTF-8">
    </span>Swagger UI<span style="color:#e8bf6a;">
    rel="icon" type="image/png" href="webjars/springfox-swagger-ui/images/favicon-32x32.png" sizes="32x32"/>
    rel="icon" type="image/png" href="webjars/springfox-swagger-ui/images/favicon-16x16.png" sizes="16x16"/>
    href='webjars/springfox-swagger-ui/css/typography.css' media='screen' rel='stylesheet' type='text/css'/>
    href='webjars/springfox-swagger-ui/css/reset.css' media='screen' rel='stylesheet' type='text/css'/>
    href='webjars/springfox-swagger-ui/css/screen.css' media='screen' rel='stylesheet' type='text/css'/>
    href='webjars/springfox-swagger-ui/css/reset.css' media='print' rel='stylesheet' type='text/css'/>
    href='webjars/springfox-swagger-ui/css/print.css' media='print' rel='stylesheet' type='text/css'/>

    
    
    
    
    
    
    
    
    
    
    
    
    
    

    

    
    
    




class="swagger-section">
id='header'>
class="swagger-ui-wrap"> id="logo" href="http://swagger.io">class="logo__img" alt="swagger" height="30" width="30" src="webjars/springfox-swagger-ui/images/logo_small.png" alt="SpringBoot整合Swagger2(附汉化教程)"/> class="logo__title">swagger
id='api_selector'>
class='input'> placeholder="http://example.com/api" id="input_baseUrl" name="baseUrl" type="text"/>
id='auth_container'>
id="message-bar" class="swagger-ui-wrap" data-sw-translate> 
id="swagger-ui-container" class="swagger-ui-wrap">

你可能感兴趣的:(swagger 汉化)