스프링 부트 1.2.1에서 작동하는 Swagger UI를 얻으려고합니다. 나는 https://github.com/martypitt/swagger-springmvc에 지시를 따르고 나는 나의 봄 윤곽에 @EnableSwagger
를 추가했다.스프링 부트로 작동하는 Swagger UI를 얻을 수 없습니다.
http://localhost:8080/api-docs
에 갈 때 JSON이 표시되지만 멋진 HTML은 표시되지 않습니다.
나는 메이븐을 사용하고 자신감-UI에 대한 종속성 추가하고이 종속성의 내 전체 목록
<dependency>
<groupId>org.ajar</groupId>
<artifactId>swagger-spring-mvc-ui</artifactId>
<version>0.4</version>
</dependency>
입니다
: 나는 또한 URL로http://localhost:8080/docs/index.html
을 시도
<dependencies>
<dependency>
<groupId>com.mangofactory</groupId>
<artifactId>swagger-springmvc</artifactId>
<version>0.9.4</version>
</dependency>
<dependency>
<groupId>org.ajar</groupId>
<artifactId>swagger-spring-mvc-ui</artifactId>
<version>0.4</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
,하지만 그건 그냥 준다 "Whitelabel Error Page"
업데이트 :
나는 문제 보여 Github에서의 테스트 프로젝트를 생성 : 저도 같은 문제가 https://github.com/wimdeblauwe/springboot-swagger-test
http : // localhost : 8080/sdoc.jsp 또는 http : // localhost : 8080/app/sdoc.jsp를 사용해 보셨습니까? – Ron
@Ron 지금 시도했지만 작동하지 않습니다. –
바로 여기에 쓰여진 내용을 따랐습니다 - https://github.com/adrianbk/swagger-springmvc-demo/tree/master/swagger-ui - 여기에 답장을받지 못하면 그 문제를 열어 보시기 바랍니다. 저장소. 애드리안은 매우 민감합니다. – Ron