Skip to content

Support WebJars directly in Jersey #11355

@jessemillar

Description

@jessemillar

This is half question and half (potential) bug report. I've inquired about the problem in the webjars-locator project and was directed here.

I'm trying to get swagger-ui working in a version agnostic manner inside of Spring Boot with Jersey and Tomcat. According to the WebJars documentation, having a pom.xml similar to the following should allow me to access swagger-ui via http://localhost:8080/webjars/swagger-ui/ but it only works via http://localhost:8080/webjars/swagger-ui/3.6.1.

<dependencies>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-jersey</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-tomcat</artifactId>
    </dependency>
    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>swagger-ui</artifactId>
      <version>3.6.1</version>
    </dependency>
    <dependency>
      <groupId>org.webjars</groupId>
      <artifactId>webjars-locator</artifactId>
      <version>0.32-1</version>
    </dependency>
</dependencies>

Is there anything special I'd need to do to get webjars-locator working in this situation? It works just fine in spring-boot-starter-web which leads me to believe this is potentially a bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions