spring boot @ApiModelProperty 需要引入哪个依赖
时间: 2023-11-01 19:21:58 浏览: 155
Spring Boot依赖注入
要使用spring boot @ApiModelProperty注解,需要引入springfox-swagger2和springfox-swagger-ui的依赖。具体的依赖配置如下:
```
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.9.2</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.9.2</version>
</dependency>
```
请注意,这些依赖是用来生成API文档的,@ApiModelProperty注解用于在实体类中定义API的属性信息。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [笔记迁移(一):SpringBoot学习](https://blog.csdn.net/weixin_44225716/article/details/108424974)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [@Api @ApiOperation @ApiModel @ApiModelProperty——Swagger常用注解](https://blog.csdn.net/u011149152/article/details/129856509)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文