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
Vueのバリデーション、結局どれを選べばいい? ― 自作バリデーションの限界と、脱却までの道のり ― / Which Vue Validation Library Should We Really Use? The Limits of Self-Made Validation and How I Finally Moved On
neginasu
2
180
Foundation Modelsを実装日本語学習アプリを作ってみた!
hypebeans
1
120
EMこそClaude Codeでコード調査しよう
shibayu36
0
320
bootcamp2025_バックエンド研修_WebAPIサーバ作成.pdf
geniee_inc
0
120
スマホから Youtube Shortsを見られないようにする
lemolatoon
27
33k
コードとあなたと私の距離 / The Distance Between Code, You, and I
hiro_y
0
190
CSC509 Lecture 07
javiergs
PRO
0
240
バッチ処理を「状態の記録」から「事実の記録」へ
panda728
PRO
0
180
Go言語はstack overflowの夢を見るか?
logica0419
0
520
Reactive Thinking with Signals and the Resource API
manfredsteyer
PRO
0
100
contribution to astral-sh/uv
shunsock
0
450
他言語経験者が Golangci-lint を最初のコーディングメンターにした話 / How Golangci-lint Became My First Coding Mentor: A Story from a Polyglot Programmer
uma31
0
330
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3.1k
GraphQLとの向き合い方2022年版
quramy
49
14k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.2k
Art, The Web, and Tiny UX
lynnandtonic
303
21k
Unsuck your backbone
ammeep
671
58k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.9k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
Documentation Writing (for coders)
carmenintech
75
5.1k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
Facilitating Awesome Meetings
lara
57
6.6k
How to Ace a Technical Interview
jacobian
280
24k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
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