Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use WebJars versioned URLs #1099

Merged
merged 1 commit into from
Oct 16, 2022
Merged

Use WebJars versioned URLs #1099

merged 1 commit into from
Oct 16, 2022

Conversation

sdeleuze
Copy link
Contributor

In order to improve efficiency (see spring-projects/spring-framework#27619) and allow native image compatibility, this commit uses WebJars versioned URLs which are supported out of the box on Spring Boot via /META-INF/resources default resource location configuration, removing the need to use webjars-locator-core dependency and WebJarsResourceResolver.

I have been able to measure a consistent 5% startup time improvement on the JVM with that simple change on my local machine.

In order to improve efficiency (see spring-projects/spring-framework#27619)
and allow native image compatibility, this commit uses WebJars versioned URLs
which are supported out of the box on Spring Boot via /META-INF/resources
default resource location configuration, removing the need to use
webjars-locator-core dependency and WebJarsResourceResolver.

I have been able to measure a consistent 5% startup time improvement on
the JVM with that simple change on my local machine.
@sdeleuze sdeleuze requested a review from dsyer October 16, 2022 15:11
@dsyer dsyer merged commit a5cbb85 into main Oct 16, 2022
sdeleuze added a commit to sdeleuze/spring-petclinic that referenced this pull request Oct 16, 2022
 - Tested with mysql
 - Rebased on top of spring-projects#1099 for WebJars support
 - Switch to Caffeine for caching since it is supported on native unlike Ehcache
 - Use -H:+AddAllCharsets -H:+IncludeAllTimeZones flags required for MySQL
 - Use latest metadata repository 0.2.3 (will be the default with Native Build Tools 0.9.15)
 - Registers resource hints for WebJars and db resource directory
fgibelin added a commit to cloudbees-guru/spring-petclinic that referenced this pull request Oct 24, 2022
sdeleuze added a commit to sdeleuze/spring-petclinic-kotlin that referenced this pull request Apr 5, 2023
In order to improve efficiency (see spring-projects/spring-framework#27619)
and allow native image compatibility, this commit uses WebJars versioned URLs
which are supported out of the box on Spring Boot via /META-INF/resources
default resource location configuration, removing the need to use
webjars-locator-core dependency and WebJarsResourceResolver.

I have been able to measure a consistent 5% startup time improvement on
the JVM with that simple change on my local machine.

Similar to spring-projects/spring-petclinic#1099
sdeleuze added a commit to sdeleuze/spring-petclinic-kotlin that referenced this pull request Apr 6, 2023
In order to improve efficiency (see spring-projects/spring-framework#27619)
and allow native image compatibility, this commit uses WebJars versioned URLs
which are supported out of the box on Spring Boot via /META-INF/resources
default resource location configuration, removing the need to use
webjars-locator-core dependency and WebJarsResourceResolver.

I have been able to measure a consistent 5% startup time improvement on
the JVM with that simple change on my local machine.

Similar to spring-projects/spring-petclinic#1099
mahajokhio2 pushed a commit to mahajokhio2/spring-petclinic that referenced this pull request Jun 2, 2024
In order to improve efficiency (see spring-projects/spring-framework#27619)
and allow native image compatibility, this commit uses WebJars versioned URLs
which are supported out of the box on Spring Boot via /META-INF/resources
default resource location configuration, removing the need to use
webjars-locator-core dependency and WebJarsResourceResolver.

I have been able to measure a consistent 5% startup time improvement on
the JVM with that simple change on my local machine.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants