Skip to content

Ability to use webjar with spring without specifying version info in HTML/jsp file [SPR-12323] #16928

@spring-projects-issues

Description

@spring-projects-issues

Titi Wangsa opened SPR-12323 and commented

In Play Framework,
we could use this

<link rel='stylesheet' href='@routes.WebJarAssets.at(WebJarAssets.locate("css/bootstrap.min.css"))'>

we already specified the version information in the sbt file.

In Spring
We need the version information in;

<link rel='stylesheet' href='/webjars/bootstrap/3.1.0/css/bootstrap.min.css'>

and
also in the pom.xml file

Expected behaviour:
we only specify

<link rel='stylesheet' href='/webjars/bootstrap.min.css'>

Perhaps we can specify the ResourceLoader here:

<mvc:resources mapping="/webjars/**" resourceLoader="pathMatchingResourcePatternResolver" location="/webjars/"/>

Reference URL: http://www.webjars.org/documentation

Referenced from: commits 57e0c78, 9e5a33c, e72b821

1 votes, 8 watchers

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions