title: How to configure two Swagger groups
body: <p>I am following the instructions provided here: <a href="https://stackoverflow.com/questions/25674863/why-does-swagger-annotations-generate-api-docs-with-default-path-prefix">Why does swagger annotations generate api-docs with default path prefix</a> and things work great. I have my Swagger APIs showing up with a custom group name.</p>
  
  <p>Now, I want to add another group and this is where I am stuck. I tried to change the configuration file to:</p>
  
  <pre><code>@Configuration
  @EnableSwagger
  public class MySwaggerConfig {
      private SpringSwaggerConfig springSwaggerConfig;
  
      @Autowired
      public void setSpringSwaggerConfig(SpringSwaggerConfig springSwaggerConfig) {
        this.springSwaggerConfig = springSwaggerConfig;
      }
  
  
      @Bean
      public SwaggerSpringMvcPlugin customImplementation() {
        return new SwaggerSpringMvcPlugin(this.springSwaggerConfig)
              .swaggerGroup("my-group1")).includePatterns("/admin/.*");
      }
  
  
      @Bean
      public SwaggerSpringMvcPlugin customImplementation() {
        return new SwaggerSpringMvcPlugin(this.springSwaggerConfig)
          .swaggerGroup("my-group2")).includePatterns("/users/.*");
      }
  
  }
  </code></pre>
  
  <p>Unfortunately this doesn't work. None of the groups end up even showing up. I then tried creating two Swagger config files. In this case only one file is being picked up. </p>
  
  <p>Any idea?</p>