Firefox SpringFox(SwiggerUI)2.9.2如何禁用';试试看';按钮
我试图从UI中禁用“试用”按钮Firefox SpringFox(SwiggerUI)2.9.2如何禁用';试试看';按钮,firefox,swagger-ui,Firefox,Swagger Ui,我试图从UI中禁用“试用”按钮 <dependency> <groupId>io.springfox</groupId> <artifactId>springfox-swagger-ui</artifactId> <version>2.9.2</version> </dependency> 伊奥·斯普林福克斯 springfox招摇过市用户界面 2.9.2 在我的Java
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.9.2</version>
</dependency>
伊奥·斯普林福克斯
springfox招摇过市用户界面
2.9.2
在我的Java类中,我尝试禁用按钮,但我尝试的属性似乎都不起作用。如何禁用“试用”按钮
@GetMapping(path = "/swagger-resources/configuration/ui", produces = APPLICATION_JSON_VALUE)
public Object uiConfig() {
HashMap<String, Object> map = new HashMap<>();
...
1. map.put("supportedSubmitMethods", new String[0]);
2. map.put("x-explorer-enabled", Boolean.FALSE);
3. map.put("x-samples-enabled", Boolean.FALSE);
...
return map;
}
@GetMapping(path=“/swagger resources/configuration/ui”,products=APPLICATION\u JSON\u VALUE)
公共对象uiConfig(){
HashMap=newHashMap();
...
1.map.put(“supportedSubmitMethods”,新字符串[0]);
2.map.put(“x-explorer-enabled”,Boolean.FALSE);
3.map.put(“x-samples-enabled”,Boolean.FALSE);
...
返回图;
}
下面的代码对我有用
@Bean
UiConfiguration uiConfig()
{
return new UiConfiguration( null, UiConfiguration.Constants.NO_SUBMIT_METHODS );
}
谢谢