http://localhost:8080/api/swagger-ui.html访问 页面报错:
Whitelabel Error PageThis application has no explicit mapping for /error, so you are seeing this as a fallback.Sun Nov 06 17:04:28 GMT+08:00 2016
There was an unexpected error (type=Not Found, status=404).
No message available配置如下:
pom:<!-- 引入swagger2 -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.4.0</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.4.0</version>
</dependency>@Configuration
@EnableSwagger2
public class SwaggerConfiguration { private final Logger log = LoggerFactory.getLogger(SwaggerConfiguration.class); @Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.any())
.paths(PathSelectors.any())
.build();
}
}
Whitelabel Error PageThis application has no explicit mapping for /error, so you are seeing this as a fallback.Sun Nov 06 17:04:28 GMT+08:00 2016
There was an unexpected error (type=Not Found, status=404).
No message available配置如下:
pom:<!-- 引入swagger2 -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.4.0</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.4.0</version>
</dependency>@Configuration
@EnableSwagger2
public class SwaggerConfiguration { private final Logger log = LoggerFactory.getLogger(SwaggerConfiguration.class); @Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
.select()
.apis(RequestHandlerSelectors.any())
.paths(PathSelectors.any())
.build();
}
}
解决方案 »
- 求助,jsp页面<s:if test="">中 取当前页面<s:textfield >标签的value进行比较 在线等,谢谢
- System.setProperty 与 System.getProperty
- myeclpise 怎么用 急
- openSessionInviewFilter如果不起作用,要怎么查原因呢
- java富客户端企业应用框架发布
- java程序如何随linux系统启动
- 为什么现在还有一部人喜欢用jsp+javabean+servlet做项目架构?它与其它相比,有什么优势?
- 散分
- java:comp/env有什么用呀?
- 我在IE6里运行applet程序,为什么IE不自动更新
- jsp页面的,<s:iterstor>怎么取List里面的Set集合?
- SQL基础题目,谁会给俺看下吧
然后加 @ComponentScan({"com.isoftstone.cityinsight.cidev.web.controller"})
<mvc:resources mapping="swagger-ui.html" location="classpath:/META-INF/resources/"/>
<mvc:resources mapping="/webjars/**" location="classpath:/META-INF/resources/webjars/"/>访问地址为:
* http://IP:port/{context-path}/swagger-ui.html
* eg:http://localhost:8080/jd-config-web/swagger-ui.html