Skip to content
This repository has been archived by the owner on Jun 6, 2018. It is now read-only.

Commit

Permalink
#3 swagger 集成,排除/manage
Browse files Browse the repository at this point in the history
  • Loading branch information
calvin1978 committed Dec 21, 2016
1 parent 988519b commit 484561f
Showing 1 changed file with 17 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
package io.springside.springtime.springboot;

import static springfox.documentation.builders.PathSelectors.*;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

import com.google.common.base.Predicates;

import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;

@ComponentScan
@Configuration
public class SpringTimeConfiguration {

@Bean
public Docket swaggerSpringMvcPlugin() {
return new Docket(DocumentationType.SWAGGER_2).groupName("business-api").select().paths(Predicates.not(regex("/manage.*"))) // and by paths
.build();
}

}

0 comments on commit 484561f

Please sign in to comment.