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
370
0
Share
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
740
HTTP2 for the web developer devoxx
bclozel
0
200
HTTP2 for the web developer
bclozel
1
160
Inside http://spring.io
bclozel
1
400
Intro to Spring Boot
bclozel
4
2.7k
Inside spring.io: a production spring reference application
bclozel
0
160
Open-sourcing http://spring.io
bclozel
1
660
Other Decks in Programming
See All in Programming
飯MCP
yusukebe
0
490
ドメインイベントでビジネスロジックを解きほぐす #phpcon_odawara
kajitack
2
120
車輪の再発明をしよう!PHP で実装して学ぶ、Web サーバーの仕組みと HTTP の正体
h1r0
3
510
RSAが破られる前に知っておきたい 耐量子計算機暗号(PQC)入門 / Intro to PQC: Preparing for the Post-RSA Era
mackey0225
3
120
PHPで TLSのプロトコルを実装してみるをもう一度しゃべりたい
higaki_program
0
180
L’IA au service des devs : Anatomie d'un assistant de Code Review
toham
0
220
Radical Imagining - LIFT 2025-2027 Policy Agenda
lift1998
0
250
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
340
ふりがな Deep Dive try! Swift Tokyo 2026
watura
0
140
今年もTECHSCOREブログを書き続けます!
hiraoku101
0
230
20260320登壇資料
pharct
0
170
Xdebug と IDE による デバッグ実行の仕組みを見る / Exploring-How-Debugging-Works-with-Xdebug-and-an-IDE
shin1x1
0
350
Featured
See All Featured
Music & Morning Musume
bryan
47
7.1k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
250
Statistics for Hackers
jakevdp
799
230k
The Cost Of JavaScript in 2023
addyosmani
55
9.8k
The Invisible Side of Design
smashingmag
302
51k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Code Review Best Practice
trishagee
74
20k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.6k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
200
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
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