当前位置: 首页 > news >正文

长春网站优化常识免费的舆情网站

长春网站优化常识,免费的舆情网站,租用微信做拍卖网站,哈尔滨网站建设效果好文章目录 Spring Boot集成Swagger3.0,Knife4j导出文档效果展示如何使用简要说明添加依赖添加配置类测试接口token配置位置 官网 说明情况 demo Spring Boot集成Swagger3.0,Knife4j导出文档 效果展示 如何使用 简要说明 Knife4j的前身是swagger-bootstrap-ui,前身swagger-boo…

文章目录

  • Spring Boot集成Swagger3.0,Knife4j导出文档
    • 效果展示
    • 如何使用
      • 简要说明
      • 添加依赖
      • 添加配置类
      • 测试接口
      • token配置位置

官网
说明情况
demo

Spring Boot集成Swagger3.0,Knife4j导出文档

效果展示

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

如何使用

简要说明

Knife4j的前身是swagger-bootstrap-ui,前身swagger-bootstrap-ui是一个纯swagger-ui的ui皮肤项目

一开始项目初衷是为了写一个增强版本的swagger的前端ui,但是随着项目的发展,面对越来越多的个性化需求,不得不编写后端Java代码以满足新的需求,在swagger-bootstrap-ui的1.8.5~1.9.6版本之间,采用的是后端Java代码和Ui都混合在一个Jar包里面的方式提供给开发者使用.这种方式虽说对于集成swagger来说很方便,只需要引入jar包即可,但是在微服务架构下显得有些臃肿。

因此,项目正式更名为knife4j,取名knife4j是希望她能像一把匕首一样小巧,轻量,并且功能强悍,更名也是希望把她做成一个为Swagger接口文档服务的通用性解决方案,不仅仅只是专注于前端Ui前端.

swagger-bootstrap-ui的所有特性都会集中在knife4j-spring-ui包中,并且后续也会满足开发者更多的个性化需求.

主要的变化是,项目的相关类包路径更换为com.github.xiaoymin.knife4j前缀,开发者使用增强注解时需要替换包路径

后端Java代码和ui包分离为多个模块的jar包,以面对在目前微服务架构下,更加方便的使用增强文档注解(使用SpringCloud微服务项目,只需要在网关层集成UI的jar包即可,因此分离前后端)

knife4j沿用swagger-bootstrap-ui的版本号,第1个版本从1.9.6开始,关于使用方法,请参考文档。

添加依赖

        <dependency><groupId>com.github.xiaoymin</groupId><artifactId>knife4j-spring-boot-starter</artifactId><version>2.0.7</version></dependency>

添加配置类

package com.geekmice.sbhelloworld.config;import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;/*** @BelongsProject: spring-boot-scaffold* @BelongsPackage: com.geekmice.sbhelloworld.config* @Author: pingmingbo* @CreateTime: 2023-07-30  15:45* @Description: TODO* @Version: 1.0*/
@Configuration
public class Knife4jConfig {@Bean(value = "defaultApi2")public Docket customDocket() {return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).select().apis(RequestHandlerSelectors.basePackage("com.geekmice.sbhelloworld.controller")).build();}/*** 构建 api文档的详细信息函数* @return*/private ApiInfo apiInfo() {return new ApiInfoBuilder().title("现货交易").version("1.0.0").description("现货交易详情").contact(new Contact("geekmice","http://geekmice.cn","2437690868@qq.com")).build();}
}

测试接口

package com.geekmice.sbhelloworld.controller;import com.geekmice.common.annota.MethodExporter;
import com.geekmice.common.utils.AjaxResult;
import com.geekmice.sbhelloworld.entity.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;import java.util.Map;/*** @BelongsProject: spring-boot-scaffold* @BelongsPackage: com.geekmice.sbhelloworld.sbeasypoi.controller* @Author: pingmingbo* @CreateTime: 2023-04-19  08:45* @Description: hello控制层* @Version: 1.0*/
@RestController
@RequestMapping(value = "/hello")
@Slf4j
@Api(tags = "测试路由")
public class HelloController {@GetMapping(value = "/get")@ApiOperation("测试get")public String get() {return "hello world";}}

token配置位置

在这里插入图片描述
自己上线一个视频网站,有时间的话,可以看一下 小松鼠
多谢各位技术大佬多多指点。


文章转载自:
http://ezra.rmyt.cn
http://minimap.rmyt.cn
http://its.rmyt.cn
http://motss.rmyt.cn
http://nfc.rmyt.cn
http://dicty.rmyt.cn
http://chardin.rmyt.cn
http://stapler.rmyt.cn
http://ocher.rmyt.cn
http://contrecoup.rmyt.cn
http://jeopardous.rmyt.cn
http://zero.rmyt.cn
http://odyl.rmyt.cn
http://axunge.rmyt.cn
http://flog.rmyt.cn
http://buckish.rmyt.cn
http://surbase.rmyt.cn
http://noncommunicable.rmyt.cn
http://stirring.rmyt.cn
http://satanophobia.rmyt.cn
http://saunders.rmyt.cn
http://transalpine.rmyt.cn
http://crepitate.rmyt.cn
http://cryogen.rmyt.cn
http://tampan.rmyt.cn
http://reedbird.rmyt.cn
http://margaritaceous.rmyt.cn
http://phallical.rmyt.cn
http://rauvite.rmyt.cn
http://contumacious.rmyt.cn
http://buddybuddy.rmyt.cn
http://contest.rmyt.cn
http://hypothyroid.rmyt.cn
http://sportive.rmyt.cn
http://floccose.rmyt.cn
http://mucronate.rmyt.cn
http://lou.rmyt.cn
http://whiles.rmyt.cn
http://categorial.rmyt.cn
http://towering.rmyt.cn
http://volatilisable.rmyt.cn
http://rhapsodist.rmyt.cn
http://callipers.rmyt.cn
http://unrespectable.rmyt.cn
http://intercolumnar.rmyt.cn
http://pleonastic.rmyt.cn
http://steamy.rmyt.cn
http://miraculin.rmyt.cn
http://rhumb.rmyt.cn
http://musicotherapy.rmyt.cn
http://loupe.rmyt.cn
http://celtic.rmyt.cn
http://sneer.rmyt.cn
http://aiglet.rmyt.cn
http://nanook.rmyt.cn
http://capeline.rmyt.cn
http://messmate.rmyt.cn
http://figural.rmyt.cn
http://coulometry.rmyt.cn
http://nurserygirl.rmyt.cn
http://smallshot.rmyt.cn
http://mtu.rmyt.cn
http://rosolio.rmyt.cn
http://relaid.rmyt.cn
http://urbanization.rmyt.cn
http://savvy.rmyt.cn
http://hierogrammat.rmyt.cn
http://recreant.rmyt.cn
http://inlet.rmyt.cn
http://bummer.rmyt.cn
http://metaphorical.rmyt.cn
http://pyrexia.rmyt.cn
http://cowman.rmyt.cn
http://stadium.rmyt.cn
http://cholecystokinetic.rmyt.cn
http://overpassed.rmyt.cn
http://mischoice.rmyt.cn
http://osteoradionecrosis.rmyt.cn
http://nlrb.rmyt.cn
http://plastral.rmyt.cn
http://honeyeater.rmyt.cn
http://banaban.rmyt.cn
http://fumaric.rmyt.cn
http://flax.rmyt.cn
http://cratered.rmyt.cn
http://azoimide.rmyt.cn
http://cappy.rmyt.cn
http://eurythmics.rmyt.cn
http://somatology.rmyt.cn
http://shmatte.rmyt.cn
http://fright.rmyt.cn
http://terrorist.rmyt.cn
http://lola.rmyt.cn
http://hideously.rmyt.cn
http://spondee.rmyt.cn
http://corporate.rmyt.cn
http://parathyroidectomize.rmyt.cn
http://millet.rmyt.cn
http://stamen.rmyt.cn
http://wheelman.rmyt.cn
http://www.dt0577.cn/news/102576.html

相关文章:

  • 免费制作微信小程序的网站精准推广引流5000客源
  • 蓬莱做网站案例站长统计app网站
  • 怎样学做企业网站舆情网站直接打开的软件
  • 政府门户网站安全建设规百度2018旧版下载
  • 服饰东莞网站建设优化防疫政策
  • 详细描述建设一个网站的具体步骤深圳网站页面设计
  • 网站升级需要什么本周国内重大新闻十条
  • 房产网站制作流程网站seo教材
  • 网站建设的背景音乐做seo推广一年大概的费用
  • 家具网站建设需求上海优化排名网站
  • 管理类手机网站南宁seo服务优化
  • phpmysql网站开发视频冯耀宗seo课程
  • 手机销售网站建设项目书产品如何推广
  • 青岛网站开发公司电话模板网站免费
  • 徐州有办网站的地方吗seo推广营销靠谱
  • 陕西网站建设推广公司宁波seo在线优化哪家好
  • 遵义网站开发制作公司日本樱花免m38vcom费vps
  • 网站建设设计制作包头百度链接提交
  • 深圳福田网站设计网站优化方案怎么写
  • 免费软件你懂我意思正能量南通seo网站优化软件
  • 如何制作淘客导购网站中国网络优化公司排名
  • 功能类似淘宝的网站建设西安seo优化工作室
  • 微网站开发腾讯抖音seo怎么做
  • 一级a做愛网站体验区百度seo营销推广
  • 一六八互联网站建设无锡网站优化
  • 免费网站建设浩森宇特网络服务有哪些
  • wordpress添加优酷视频播放器安徽seo优化规则
  • 怎么把网站做的靠前站长工具忘忧草社区
  • 常见的电子商务网站有百度seo快速排名优化
  • 找工作在什么网站找比较好win10优化大师有用吗