In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces the springboot how to update the configuration of Swagger3 related knowledge, the content is detailed and easy to understand, the operation is simple and fast, has a certain reference value, I believe you will get something after reading this springboot how to update the configuration Swagger3 article, let's take a look at it.
1. Introduce dependency. Version 3.0.0 can introduce only one.
Io.springfox springfox-boot-starter 3.0.0
two。 Configuration class SwaggerConfig
Package org.fh.config;import org.springframework.context.annotation.Bean;import org.springframework.context.annotation.Configuration;import springfox.documentation.builders.ApiInfoBuilder;import springfox.documentation.builders.PathSelectors;import springfox.documentation.builders.RequestHandlerSelectors;import springfox.documentation.oas.annotations.EnableOpenApi;import springfox.documentation.service.ApiInfo;import springfox.documentation.spi.DocumentationType;import springfox.documentation.spring.web.plugins.Docket / * Note: Swagger API API generates * author: FH Admin * from fhadmin.cn * / @ Configuration@EnableOpenApipublic class SwaggerConfig {@ Bean public Docket createRestApi () {return new Docket (DocumentationType.OAS_30) .apiInfo (apiInfo ()) .select () .apis (RequestHandlerSelectors.basePackage ("org.fh.controller")) / / for Current package path .packages (PathSelectors.any ()) .build () } private ApiInfo apiInfo () {return new ApiInfoBuilder () .title ("FH Admin Swagger3 RESTful API") / / Page title. Version ("3. 0") / / version number. Description ("fhadmin.org") / / description Describe .build () }}
3.Swagger intercept configuration
Package org.fh.config;import org.springframework.context.annotation.Configuration;import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;/** * description: Swagger intercept configuration * author: FH Admin * from fhadmin.cn * / @ Configurationpublic class WebMvcConfig implements WebMvcConfigurer {@ Override public void addResourceHandlers (ResourceHandlerRegistry registry) {registry. AddResourceHandler ("/ swagger-ui/**") .addResourceLocations ("classpath:/META-INF/resources/webjars/springfox-swagger-ui/") .resourceChain (false);} @ Override public void addViewControllers (ViewControllerRegistry registry) {registry.addViewController ("/ swagger-ui/") .setViewName ("forward:/swagger-ui/index.html");}} 4. Visit 127.0.0.1:8081/swagger-ui/index.html5. Add notes to the API description case handling class, such as @ Api ("user login interface"), such as @ ApiOperation (value = "login", notes= "verify whether the login is successful") @ ApiImplicitParam (name = "KEYDATA", value = "user name and password confusion code combination", paramType = "query", required = true, dataType = "String").
Workflow module-www.fhadmin.cn
1. Model management: web online process designer, import and export xml, replication process, deployment process
two。 Process management: import and export process resource files, view flow chart, reflect process model according to process instance, activate and suspend
3. Running process: view process information, current task node, current flowchart, invalidate pause process, assign waiting person, free jump
4. Historical process: view process information, process time, process status, view task initiator information
5. To-do tasks: check my personal tasks and tasks under this role, handle, reject, invalidate, and assign an agent
6. Completed tasks: check the tasks you have handled, as well as process information, flow chart, process status (invalid and rejected)
When handling the task, you can choose the user to make a CC, that is, to send an internal letter to the person being copied to notify the current approval opinions and remarks.
Note: when the current task is completed, the person waiting for the next task will receive an instant message reminder of the new task when the task is invalidated or completed.
The task initiator will be notified by the message from the station.
This is the end of the article on "how to update and configure Swagger3 for springboot". Thank you for reading! I believe that everyone has a certain understanding of the knowledge of "how to update and configure Swagger3 for springboot". If you want to learn more knowledge, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.