2017-10-01 3 views
0

Apache CXF로 Spring Boot 응용 프로그램을 빌드 중입니다. swagger를 추가하는 동안 사양에 정의 된 No 작업을 얻습니다! 오류, 비록 내가 주석 1 ~ 2 opeations를 통해 지정되었지만. 자신감에 대한 CXF 설정의 부분은 다음과 같습니다 : Swagger UI 및 CXF 사양에 정의 된 작업이 없음

factory.setFeatures(Collections.singletonList(createSwaggerFeature())); 

public Swagger2Feature createSwaggerFeature() { 
     Swagger2Feature swagger2Feature = new Swagger2Feature(); 
     swagger2Feature.setPrettyPrint(true); 
     swagger2Feature.setSupportSwaggerUi(true); 
     swagger2Feature.setScanAllResources(true); 
     swagger2Feature.setHost("localhost:8080"); 
     swagger2Feature.setBasePath("/cxf/todo_list"); 
     swagger2Feature.setTitle("TodoList Application"); 
     swagger2Feature.setContact("https://www.github/abondar24"); 
     swagger2Feature.setDescription("Another TodoList application with Spring Boot and Swagger"); 
     swagger2Feature.setVersion("1.0.0"); 
     return swagger2Feature; 
    } 

가 나는 기능은 correctly.What 내가 놓치고 설정되지 않은 생각? API-문서에 대한 링크는 다음과 같이이다 : http://localhost:8080/cxf/todo_list/api-docs?url=/cxf/todo_list/swagger.json

에서이 UI 페이지에 필드를 탐험 : /cxf/todo_list/swagger.json

+0

코드를 어딘가에서 사용할 수 있습니까? 지금까지 나는 어떤 오류도 보지 못했다. 다음 샘플을 실제 샘플과 비교할 수도 있습니다. https://github.com/apache/cxf/tree/master/distribution/src/main/release/samples/jax_rs/description_swagger2 –

답변

0

나는이 문제를 해결했다. @Path 주석을 내 REST 서비스에 넣는 것을 잊어 버렸습니다. 나는 그것을 한 후에 일을 시작했다. 내가 이해할 수없는 유일한 방법 - 기본 태그를 없애는 방법