1. Comment interfaces, entity classes, method arguments, etc
// Add comments to the entity class
@apiModel (" User entity class ")
public class User {
    @apiModelProperty (" username ")
    public String name;
    @ ApiModelProperty (" password ")
    public String passwrod;
}




Copy the code
*/ @apiOperation (" Hello control class ") @getMapping ("/test") public String text(){return "hello"; } @postmapping ("/User") public User User(){return new User(); }}Copy the code

2. You can create multiple groups and configure different configurations for each group

    public Docket docket1(){
        return new Docket(DocumentationType.SWAGGER_2).groupName("A");

    }
    @Bean
    public Docket docket2(){
        return new Docket(DocumentationType.SWAGGER_2).groupName("B");

    }
    @Bean
    public Docket docket3(){
        return new Docket(DocumentationType.SWAGGER_2).groupName("C");

    }
    
Copy the code

3, test interface, similar to postman function

The results of the interface tests are in