renamed folder

This commit is contained in:
Tony Tam
2015-04-04 11:53:02 -07:00
parent 1e82fc5d24
commit 568ca26747
23 changed files with 20 additions and 17 deletions

View File

@@ -0,0 +1,39 @@
package {{configPackage}};
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
@Configuration
@ComponentScan(basePackages = "{{apiPackage}}")
@EnableWebMvc
@EnableSwagger2 //Loads the spring beans required by the framework
@PropertySource("classpath:swagger.properties")
public class SwaggerConfig {
@Bean
ApiInfo apiInfo() {
ApiInfo apiInfo = new ApiInfo(
"{{appName}}",
"{{appDescription}}",
"{{appVersion}}",
"{{infoUrl}}",
"{{infoEmail}}",
"{{licenseInfo}}",
"{{licenseUrl}}" );
return apiInfo;
}
@Bean
public Docket customImplementation(){
return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo());
}
}