cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <>
Subject [jira] [Commented] (CXF-7092) Swagger2Feature tries to resolve swagger-ui resources with api-docs
Date Fri, 21 Oct 2016 19:32:58 GMT


Sergey Beryozkin commented on CXF-7092:

I've ended up adding a warning if the providers with the same class name have been detected.
In most cases it is a sign of the configuration/setup issue, but besides that, even though
@Component classes are only detected if they have been explicitly enabled via @Bean or in
the application context resources, I've been thinking for a while to also support the class
path scanning of @Component classes, Spring scanner does support it but it has not just been
integrated into CXF and in that case it will be hard to decide what takes the priority if
we can have say a JAX-RS provider which is also annotated as @Component.
IMHO doing the warning is reasonable at this stage...

> Swagger2Feature tries to resolve swagger-ui resources with api-docs
> -------------------------------------------------------------------
>                 Key: CXF-7092
>                 URL:
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 3.1.7
>         Environment: Spring Boot 1.4.1
> Swagger 2.2.2
>            Reporter: Dennis Kieselhorst
>            Priority: Minor
>             Fix For: 3.2.0, 3.1.9
>         Attachments: cxf7092.png
> Add Swagger2Feature for customization to the class annotated with @SpringBootApplication,
> {code:java}
>    @Bean
>    public Swagger2Feature swagger2Feature() {
>       Swagger2Feature swagger2Feature = new Swagger2Feature();
>       swagger2Feature.setPrettyPrint(true);
>       swagger2Feature.setContact("person who knows the API");
>       return swagger2Feature;
>    }
> {code}
> Open url for swagger UI in browser will fail with:
> {noformat}
> Caused by: JAR entry META-INF/resources/webjars/swagger-ui/2.2.2/api-docs/lib/swagger-oauth.js
not found in /work/m2repository/org/webjars/swagger-ui/2.2.2/swagger-ui-2.2.2.jar
> 	at
> 	at
> 	at
> 	at org.apache.cxf.jaxrs.swagger.Swagger2Feature$SwaggerUIService.getResource(
> 	... 102 more
> {noformat}
> Please note that it works correctly when the Swagger2Feature is auto-configured without

This message was sent by Atlassian JIRA

View raw message