0
我试图整合springfox不回我现有的冲刺web应用程序我配置了springfox Web应用程序正确启动,但没有得到产生springfox这个API文档
这里的API文档是springfox配置类
@EnableSwagger2 //Loads the spring beans required by the framework
public class SwaggerConfig {
@Bean
public Docket swaggerSpringMvcPlugin() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.paths(PathSelectors.any())
.build()
.apiInfo(apiInfo());
}
}
这里是bean创建
<bean id="config" class="com.myApp.general.SwaggerConfig"/>
以下是控制器
@Controller
public class MyController {
@ApiOperation(value = "Gets architecture services",
notes = "",
produces = "application/json")
@RequestMapping(value = "v1/users", method = RequestMethod.GET)
@ResponseBody
public Object users(HttpServletResponse response) {
//method implementation
}
}
当我试图让API文档,它只是返回一个404有人可以帮助我在此