• 2024-07-05手把手教你解决spring boot导入swagger2版本冲突问题,刘老师教编程
    手把手教你解决springboot导入swagger2版本冲突问题本文仅为个人理解,欢迎大家批评指错首先SpringBoot3和Swagger2不兼容。在SpringBoot3中,应该使用Springdoc或其他与SpringBoot3兼容的API文档工具来替代Swagger2。Swagger2的依赖底层使用的是javax
  • 2024-06-12springboot2.6x集成swagger2踩坑点
    最近在用springBoot2.6.13集成swagger2.9.2时出现了几个bug,经过几番尝试后,得出了最终的结论,时间紧可以直接看结论。首次集成swagger2时,启动springboot后的bug:org.springframework.context.ApplicationContextException:Failedtostartbean'documentationPluginsBoots
  • 2024-05-30【已解决】Swagger配置问题—Failed to start bean ‘documentationPluginsBootstrapper‘
    项目场景:swagger-demo编写SwaggerConfig.java后运行SwaggerDemoApplication.java不能成功问题描述ErrorstartingApplicationContext.Todisplaytheconditionsreportre-runyourapplicationwith'debug'enabled.org.springframework.context.ApplicationCont
  • 2024-05-12springmvc+swagger2+struts2
    jar包<dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> <version>2.8.7</version> </dependency> <dependency> <groupId>com.fasterxml.ja
  • 2024-04-29Swagger的配置与使用
    swagger前言学习1.swagger前期准备搜索springfox-swag引入两个jar包,springfox-swagger2和springfox-swagger-ui<!--https://mvnrepository.com/artifact/io.springfox/springfox-swagger2--><dependency><groupId>io.springfox</groupId><a
  • 2024-02-26Swagger2注释篇
    API使用说明作用范围APIAPI常用参数作用位置协议集描述@Api@Api(tags={"tag1","tag2","..."})controller类协议描述@ApiOperation@ApiOperation(value="功能描述",notes="备注")controller类的方法描述返回对象的意义@ApiModel@ApiModel
  • 2023-12-02Spring Boot如何在swagger2中配置header请求头等参数信息
    前言在开发Web应用程序时,处理HTTP请求头信息是非常重要的。一般情况下,我们需要将一些固定的参数,如Token、Session等,附加在请求头中进行传递。Swagger2是一个非常流行的API文档生成工具,但在使用时,我们可能需要在请求头中附加这些参数,本文就是为了解决这个问题而写的。摘要本文将
  • 2023-11-30swagger - NullPointerException
    java.lang.NullPointerException:null atspringfox.documentation.swagger2.mappers.RequestParameterMapper.bodyParameter(RequestParameterMapper.java:264)~[springfox-swagger2-3.0.0.jar:3.0.0]解决方式:寻找@ApiImplicitParam(name=""),name值没有对应接口入参
  • 2023-11-22001swagger2--接口文档生成利器
    1.配置在springboot整合swagger21.1引入jar包<dependency><groupId>com.allen.pan</groupId><artifactId>allen-pan-core</artifactId><version>1.0</version></dependency&g
  • 2023-10-11SpringBoot 2.7.x 整合 swagger2 冲突问题
    问题描述SpringBoot2.7.x版本在整合swagger2时抛出异常如下:复制代码org.springframework.context.ApplicationContextException:Failedtostartbean'documentationPluginsBootstrapper';nestedexceptionisjava.lang.NullPointerException atorg.springframework
  • 2023-10-09swagger2启动报错
    1.添加注解:@EnableSwagger2注解能将swagger的配置文件导入ioc容器,使用容器管理swagger相关的各种核心类,并使我们能通过yml或properties文件能修改默认配置:@Import({Swagger2DocumentationConfiguration.class})public@interfaceEnableSwagger2{}...@EnableSwagger2能
  • 2023-10-04Swagger2与Knife4j集成(防踩坑)
    Swagger2与Knife4j1集成Springboot1.1依赖<!--https://mvnrepository.com/artifact/io.springfox/springfox-swagger2--><dependency><groupId>io.springfox</groupId><artifactId>springfox-swagger
  • 2023-09-27如何配置swgger以及使用方法(postman,apipost)
    一.如何配置swgger1.引入依赖:我配置的是swgger2,如果需要其他版本,可以自行百度<dependency><groupId>io.springfox</groupId><artifactId>springfox-swagger2</artifactId><version>2.4.0</version>
  • 2023-06-12随笔(十八)『SpringBoot 整合 Swagger2』
    1、添加Swagger2依赖<!--swagger2--><dependency><groupId>io.springfox</groupId><artifactId>springfox-swagger2</artifactId><version>2.9.2</version>
  • 2023-06-12springboot使用swagger2以及遇到的一些问题
    1.导入依赖<dependency><groupId>io.springfox</groupId><artifactId>springfox-swagger2</artifactId><version>2.9.2</version></dependency><dependency><groupId>io.springfox</groupId>
  • 2023-06-06Swagger2生成Api文档
    前置条件是项目中已经使用swagger一、html格式:1.加入依赖swagger2markup<!--文档生成--> <dependency> <groupId>io.github.swagger2markup</groupId> <artifactId>swagger2markup</artifactId> <version>1.3.1</ve
  • 2023-06-01springboot 中配置Swagger2
     1.引入依赖<!--swagger2依赖--><dependency><groupId>io.springfox</groupId><artifactId>springfox-swagger2</artifactId><version>2.9.2</version></dependency
  • 2023-04-27swagger2的常用注解,传递参数的注意使用方法
    背景介绍:刚开始的时候,在controller层使用@RequestParam的时候,发现这个参数是必须要输入值的,但是我们有时候必须查询的时候允许参数为空,使用这个注解就不行了。在集成了swagger2后,找了半天的原因,发现使用@ApiImplicitParam这个注解可以解决这个问题。对应下面的参数。所以我们可以使
  • 2023-04-20整合swagger2
    添加配置类importcom.google.common.base.Predicates;importorg.springframework.context.annotation.Bean;importorg.springframework.context.annotation.Configuration;importspringfox.documentation.builders.ApiInfoBuilder;importspringfox.documentation.build
  • 2023-04-18SpringBoot中配置Swagger2
    首先在pom.xml添加springfox-swagger2和springfox-swagger-ui两个依赖,并且spring-boot-starter-parent的版本不能太高,可以设置为2.1.6.RELEASE<!--https://mvnrepository.com/artifact/io.springfox/springfox-swagger2--><dependency> <groupId>io.springfox</groupId>
  • 2023-04-17springboot整合swagger2
     1.正文1.1什么是swagger2Swagger是一个规范和完整的框架,用于生成、描述、调用和可视化RESTful风格的Web服务的接口文档 .接口:controller相应的路径方法Swagger2是一款前后端分离开发中非常实用的API管理工具,它可以帮助开发者根据约定规范自动生成API文档,并支持
  • 2023-04-13swagger2与定时器
    1.springboot整合swagger21.1什么是swagger2Swagger是一个规范和完整的框架,用于生成、描述、调用和可视化RESTful风格的Web服务的接口文档.接口:controller相应的路径方法1.2为什么是swagger2目前的项目基本都是前后端分离,后端为前端提供接口的同时,还需同时提供
  • 2023-03-05Spring Security + JWT + Swagger2 登录验证一套流程小结
    SpringSecurity+JWT+Swagger2登录验证一套流程主要是三个框架的集成配置,以及各个独立的配置(主要是JWT+Security的登录验证)。流程:构建SpringBoot基本项目,
  • 2023-02-10【Swagger2】(文档版)(简洁版)(内含源代码)
    源代码请添加笔者微信获取微信号:FBIHackerHarryHao微信二维码:  目录【Swagger2】主要内容学习目标一、Swagger简介1.前言2.OpenAPI是什么3.Swagger简介
  • 2023-01-24【整理】swagger2注解说明
    @Api@Api:用在请求的类上,表示对类的说明tags="说明该类的作用,可以在UI界面上看到的注解"value="该参数没什么意义,在UI界面上也看到,所以不需要配置"@Api