Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Static Resources Management with Spring
Search
Brian Clozel
April 30, 2015
Programming
0
360
Static Resources Management with Spring
(Workshop)
Brian Clozel
April 30, 2015
Tweet
Share
More Decks by Brian Clozel
See All by Brian Clozel
Back from SpringOnePlatform 2019
bclozel
4
230
Intro à Spring Boot
bclozel
0
150
Cloud native apps with Spring Cloud
bclozel
1
720
HTTP2 for the web developer devoxx
bclozel
0
190
HTTP2 for the web developer
bclozel
1
150
Inside http://spring.io
bclozel
1
360
Intro to Spring Boot
bclozel
4
2.7k
Inside spring.io: a production spring reference application
bclozel
0
150
Open-sourcing http://spring.io
bclozel
1
650
Other Decks in Programming
See All in Programming
bootcamp2025_バックエンド研修_WebAPIサーバ作成.pdf
geniee_inc
0
120
Introduce Hono CLI
yusukebe
6
3k
AI Agent 時代的開發者生存指南
eddie
4
2k
オープンソースソフトウェアへの解像度🔬
utam0k
17
3.1k
Software Architecture
hschwentner
6
2.3k
CSC305 Lecture 10
javiergs
PRO
0
220
Six and a half ridiculous things to do with Quarkus
hollycummins
0
210
実践Claude Code:20の失敗から学ぶAIペアプログラミング
takedatakashi
16
6.5k
「ちょっと古いから」って避けてた技術書、今だからこそ読もう
mottyzzz
11
7k
Pythonに漸進的に型をつける
nealle
1
100
Foundation Modelsを実装日本語学習アプリを作ってみた!
hypebeans
0
120
開発生産性を上げるための生成AI活用術
starfish719
3
1.6k
Featured
See All Featured
Navigating Team Friction
lara
190
15k
Rails Girls Zürich Keynote
gr2m
95
14k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.5k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
30
2.9k
A designer walks into a library…
pauljervisheath
209
24k
KATA
mclloyd
PRO
32
15k
Docker and Python
trallard
46
3.6k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
127
54k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3k
Reflections from 52 weeks, 52 projects
jeffersonlam
353
21k
A Tale of Four Properties
chriscoyier
161
23k
How to Think Like a Performance Engineer
csswizardry
27
2.1k
Transcript
Static Resources Management workshop Brian Clozel @brianclozel
Getting started $ open http://bit.ly/resourcehandling $ git clone http://github.com/bclozel/…
$ git fetch -‐-‐all $ cd angularjs && mvn package
Brian Clozel @brianclozel http://spring.io/team/bclozel
First application 4 What could we achieve before Spring
4.1?
Resource Handling < 4.1 • Serve static resources from *any*
Spring Resource location • Basic Cache header management • Easy to configure 5
WORKSHOP PART #1
Remaining questions • optimize (concatenate, minify) • transform (LESS,
coffeescript, gzip) • front-‐end optimization (cache busting URLs, concatenate, minify) • development experience 7
AngularJS 8 First run with Resource Handling
Sources of inspiration • a complete asset pipeline built into
Spring MVC • fingerprinting URLs for cache busting • client side dev in Sagan project 9
Why not an asset pipeline? • runtime vs. build time
approach • languages and tools evolve *fast* • ES6, HTTP/2 10
Client source code layout • src/main/webapp just not adequate anymore
• client *and* server: dependency management, modularity, tests, build artifacts • client-‐side development: ctrl+S, F5 11
WORKSHOP PART #2
ES6 app 13 client-‐side build and JS module loaders
Spring 4.1 resource handling • ResourceResolver • ResourceTransformer
• ResourceUrlProvider 14
Built-‐in ResourceResolvers • PathResourceResolver • VersionResourceResolver • GzipResourceResolver
• CachingResourceResolver 15
Built-‐in ResourceTransformers • CssLinkResourceTransformer • AppCacheManifestResourceTransformer • CachingResourceTransformer
16
VersionResourceResolver • VersionStrategies: • ContentVersionStrategy (md5 hashes) •
FixedVersionStrategy (version string as a path prefix) 17
WORKSHOP PART #3
Q&A 19 …and what’s next?
What’s next? • https://github.com/bclozel/spring-‐resource-‐ handling • https://github.com/spring-‐io/sagan •
https://jira.spring.io 20