当前位置:网站首页>swagger2的初步使用
swagger2的初步使用
2022-07-24 03:45:00 【cc.ChenLy】
1、先建一个Springboot项目




2、pom依赖导入
不加以下配置这个使用@EnableSwagger2注解时会报错
Unable to infer base url. This is common when using dynamic servlet registration or when the API is behind an API Gateway. The base url is the root of where all the swagger resources are served…
导入依赖
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.7.0</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.7.0</version>
</dependency>
3、建一个controller

4、在启动类加

5、启动、访问
http://localhost:8080/swagger-ui.html

边栏推荐
- Y74. Chapter IV Prometheus large factory monitoring system and practice -- Introduction to promql and monitoring pod resources (V)
- MPLS VPN cross domain -optionb
- Why do some people write code so complicated?
- [interpolation expression of applet, rendering judgment, binding events and sharing]
- Read and understand the advantages of the LAAS scheme of elephant swap
- Application of motion capture in automatic control field
- Data Lake (19): SQL API reads Kafka data and writes it to iceberg table in real time
- Matlab Simulink simulation of lithium iron phosphate battery
- The progress in the stack will consume functions that cannot meet the needs of the enterprise. We are committed to
- The local picture cannot be displayed after the uniapp H5 is packaged
猜你喜欢

MySQL learning - MySQL software installation and environment configuration (Windows) details!

Why do some people write code so complicated?

08 reptile project
![[cloud native] get to know kubernetes quickly](/img/df/08db46270285fb72c216cae5496fbb.png)
[cloud native] get to know kubernetes quickly

svg图片颜色的修改 没有花里胡哨

Extend the connection boundary, expand the business scope, and comprehensively move towards the era of Intelligent Cloud network 2.0

三菱转以太网模块远创智控YC8000-FX 连接 MCGS操作方法

Developers share mindspire Lite experience, one click image segmentation

Web3 traffic aggregation platform starfish OS gives players a new paradigm experience of metauniverse

MySQL学习——MySQL软件的安装及环境配置(Windows)详细!
随机推荐
dynamixel舵机在ros下的workbnech使用
Matlab Fractional Order PID control
Using global data to realize data sharing in wechat applet
Mitsubishi Ethernet module Yuanchuang intelligent control yc8000-fx connection MCGS operation method
Embedded system transplantation [5] - Cross compilation tool chain
Batch visual target detection callout box -- Yolo format dataset
jvm类加载过程简介说明
Idea failed to load resource: the server responded with a status of 404 (not found)
训练赛《眼不见,心不烦,理不乱》题解
Method sharing of saving data to CSV file in MATLAB
idea写web项目时报错Failed to load resource: the server responded with a status of 404 (Not Found)
Emqx v4.4.5 Publishing: new exclusive subscriptions and mqtt 5.0 publishing attribute support
Basic syntax of MySQL DDL and DML and DQL
C language implementation of user login program
STL multimap
Okaleido tiger NFT is about to log in to the binance NFT platform. Are you looking forward to it?
Sword finger offer | minimum number of rotation array
Worthington: characteristics and other parameters of hexokinase from yeast
[JS reverse hundred examples] a public resource trading network, reverse analysis of announcement URL parameters
21st day of written test mandatory training