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
380
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Static Resources Management with Spring
(Workshop)
Brian Clozel
April 30, 2015
More Decks by Brian Clozel
See All by Brian Clozel
Back from SpringOnePlatform 2019
bclozel
4
250
Intro à Spring Boot
bclozel
0
170
Cloud native apps with Spring Cloud
bclozel
1
750
HTTP2 for the web developer devoxx
bclozel
0
210
HTTP2 for the web developer
bclozel
1
170
Inside http://spring.io
bclozel
1
410
Intro to Spring Boot
bclozel
4
2.8k
Inside spring.io: a production spring reference application
bclozel
0
180
Open-sourcing http://spring.io
bclozel
1
670
Other Decks in Programming
See All in Programming
一参加者から『中の人』へ 〜全通PHPerがブースに立って学んだ、カンファレンスを100倍楽しむコツ〜
wp_daisuke
0
120
市販E-Readerを乗っ取れ 〜Embedded Swiftで電子ペーパーガジェットを制御する〜
trickart
0
120
DroidKaigi 2026 「個人開発という実験場: Android エンジニアが手にする4つの自由」
slashnephy
0
220
新卒PdEのリアル
ryu1013
1
420
書籍「プロフェッショナルAI駆動開発」紹介スライド
juntaromatsumoto
0
1.1k
Go × SIMDで高速化するベクトル検索 ~ルーフラインモデルでSIMDが効く境界を探れ! ~
po3rin
1
160
自分的「カンファレンスの楽しみ方」
syumai
0
190
コンパウンドプロダクト開発のためのローカルプロセスマネージャー再発明 #layerxgo
izumin5210
0
660
初心者DevRelとして参加者だった私が、DevRel Talks!#2に登壇するまでにしてきたこと
sokohirai
0
340
Gmail/Google DriveをトリガーにAIエージェントを動かそう! / Run AI agents with Gmail/Google Drive as triggers!
har1101
3
470
高専キャリア LT 発表内容
crysta1221
6
5.6k
Oxlintはいいぞ(続)
yug1224
1
560
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
698
190k
Testing 201, or: Great Expectations
jmmastey
46
8.3k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.7k
Optimizing for Happiness
mojombo
378
71k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
240
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
410
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.5k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.9k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.3k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.9k
Rails Girls Zürich Keynote
gr2m
96
14k
Side Projects
sachag
455
43k
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