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
240
Intro à Spring Boot
bclozel
0
160
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
170
Open-sourcing http://spring.io
bclozel
1
670
Other Decks in Programming
See All in Programming
Inside Stream API
skrb
1
700
The Arts and Crafts of Work in the AI Era — Toward Mastery in Software Development
kuranuki
1
750
「エンジニアインターン、どうやって取った?」準備のリアルを語るLT会 Progate BAR
akiomatic
0
130
AIチームを指揮するOSS「TAKT」活用術 / How to Use “TAKT,” an OSS Tool for Orchestrating AI Teams
nrslib
6
890
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
130
Composerを使ったサプライチェーン攻撃の様子を眺めてみる #phpstudy
o0h
PRO
2
250
Creating Composable Callables in Contemporary C++
rollbear
0
110
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
190
過去最大のMCPアップデート! 2026-07-28 RC版の謎に迫る
licux
6
280
TypeScript+Orvalで実現する型安全かつ堅牢でスケーラブルなマルチチャネル通知基盤 / TSKaigi Night talks ~after conference~
d0riven
0
330
エージェンティックRAGにAWSで入門しよう!
har1101
8
1.5k
AI 時代のソフトウェア設計の学び方
masuda220
PRO
29
12k
Featured
See All Featured
The Illustrated Children's Guide to Kubernetes
chrisshort
51
52k
Technical Leadership for Architectural Decision Making
baasie
3
400
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
0
170
Ethics towards AI in product and experience design
skipperchong
2
310
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.2k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.9k
Designing for Performance
lara
611
70k
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
850
Discover your Explorer Soul
emna__ayadi
2
1.1k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
320
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
610
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