我有一个返回自定义ObjectMapper
实例的配置类:
@Configuration
public class JacksonConfiguration {
@Bean
public ObjectMapper objectMapper() {
return new ObjectMapper()
.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE);
}
}
我有一个Swagger2配置:
@Configuration
@EnableSwagger2
public class SwaggerConfig {
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.any())
.paths(PathSelectors.any())
.build();
}
}
我希望生成的api文档(/ v2 / api-docs)包含蛇案名称。不幸的是,它们包含骆驼的案例名称。