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
370
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
AIを駆使して新しい技術を効率的に理解する方法
nogu66
0
580
Honoを技術選定したAI要件定義プラットフォームAcsimでの意思決定
codenote
0
130
Agentに至る道 〜なぜLLMは自動でコードを書けるようになったのか〜
mackee
4
520
Stay Hacker 〜九州で生まれ、Perlに出会い、コミュニティで育つ〜
pyama86
0
210
Core MIDI を勉強して作曲用の電子ピアノ作ってみた!
hypebeans
0
100
What’s Fair is FAIR: A Decentralised Future for WordPress Distribution
rmccue
0
150
アーキテクチャと考える迷子にならない開発者テスト
irof
3
800
AI時代に必須!状況言語化スキル / ai-context-verbalization
minodriven
3
380
ノーコードからの脱出 -地獄のデスロード- / Escape from Base44
keisuke69
0
670
チーム開発の “地ならし"
konifar
4
2.7k
Eloquentを使ってどこまでコードの治安を保てるのか?を新人が考察してみた
itokoh0405
0
3.1k
予防に勝る防御なし(2025年版) - 堅牢なコードを導く様々な設計のヒント / Growing Reliable Code PHP Conference Fukuoka 2025
twada
PRO
36
11k
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.2k
What's in a price? How to price your products and services
michaelherold
246
12k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6k
Visualization
eitanlees
150
16k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
192
56k
How GitHub (no longer) Works
holman
315
140k
VelocityConf: Rendering Performance Case Studies
addyosmani
333
24k
Faster Mobile Websites
deanohume
310
31k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
31
2.7k
The Cult of Friendly URLs
andyhume
79
6.7k
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