SpringRoo项目中的swagger未检测到API

SpringRoo项目中的swagger未检测到API,swagger,Swagger,我已经尝试了很多东西,但由于某些原因,API并没有被swagger检测到。我必须为swagger指定要扫描的包吗?或者一些url包含模式 我的抽油杆配置: @Configuration @EnableSwagger @EnableWebMvc public class SwaggerConfiguration { private final Logger log = LoggerFactory .getLogger(SwaggerConfiguration.class); /

我已经尝试了很多东西,但由于某些原因,API并没有被swagger检测到。我必须为swagger指定要扫描的包吗?或者一些url包含模式

我的抽油杆配置:

@Configuration
@EnableSwagger
@EnableWebMvc
public class SwaggerConfiguration {

private final Logger log = LoggerFactory
        .getLogger(SwaggerConfiguration.class);

/**
 * Swagger Spring MVC configuration.
 */
@Bean
public SwaggerSpringMvcPlugin swaggerSpringMvcPlugin(
        SpringSwaggerConfig springSwaggerConfig) {
    log.debug("Starting Swagger");
    StopWatch watch = new StopWatch();
    watch.start();
    SwaggerSpringMvcPlugin swaggerSpringMvcPlugin = new SwaggerSpringMvcPlugin(
            springSwaggerConfig).apiInfo(apiInfo())
            .genericModelSubstitutes(ResponseEntity.class);

    swaggerSpringMvcPlugin.build();
    watch.stop();
    log.debug("Started Swagger in {} ms", watch.getTotalTimeMillis());
    return swaggerSpringMvcPlugin;
}

/**
 * API Info as it appears on the swagger-ui page.
 */
private ApiInfo apiInfo() {
    return new ApiInfo("Title", "Description", "terms of service",
            "contact", "license", "licenseUrl");
}
}

采样控制器

@RequestMapping("/settings")
@Controller
@Api(value = "/settings", description = "Endpoint for settings management")
public class SettingsController {

@ApiOperation(value = "API Operation")
@RequestMapping(value = "/changepassword", method = RequestMethod.POST)
public @ResponseBody Map<String, Object> changePassword(@RequestParam Map<String, String> userProperties,
        Model model, HttpServletRequest httpServletRequest, Locale locale) {
    Map<String, Object> responseMap = new HashMap<String, Object>();
    return responseMap;
}
}


我使用的是swagger springmvc 1.0.2版和spring 4.1.6版。请按照以下URL中的说明发布:

"apiVersion": "1.0",
"swaggerVersion": "1.2",
"apis": [ ],
"authorizations": [ ],
"info": 

{
    "title": "Title",
    "description": "Description",
    "termsOfServiceUrl": "terms of service",
    "contact": "contact",
    "license": "license",
    "licenseUrl": "licenseUrl"
}