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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Brian Clozel
April 30, 2015
Programming
0
370
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
240
Intro à Spring Boot
bclozel
0
150
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
390
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
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
5
900
ご飯食べながらエージェントが開発できる。そう、Agentic Engineeringならね。
yokomachi
1
270
AI時代でも変わらない技術コミュニティの力~10年続く“ゆるい”つながりが生み出す価値
n_takehata
2
540
Rails Girls Tokyo 18th GMO Pepabo Sponsor Talk
yutokyokutyo
0
180
DSPy入門 Pythonで実現する自動プロンプト最適化 〜人手によるプロンプト調整からの卒業〜
seaturt1e
1
390
AI主導でFastAPIのWebサービスを作るときに 人間が構造化すべき境界線
okajun35
0
410
AI駆動開発の本音 〜Claude Code並列開発で見えたエンジニアの新しい役割〜
hisuzuya
3
430
CSC307 Lecture 09
javiergs
PRO
1
850
NOT A HOTEL - 建築や人と融合し、自由を創り出すソフトウェア
not_a_hokuts
2
490
Geminiの機能を調べ尽くしてみた
naruyoshimi
0
190
CDIの誤解しがちな仕様とその対処TIPS
futokiyo
0
140
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
310
Featured
See All Featured
AI: The stuff that nobody shows you
jnunemaker
PRO
3
340
The SEO Collaboration Effect
kristinabergwall1
0
380
Building Adaptive Systems
keathley
44
2.9k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.6k
Exploring anti-patterns in Rails
aemeredith
2
280
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
170
Fashionably flexible responsive web design (full day workshop)
malarkey
408
66k
Bash Introduction
62gerente
615
210k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.3k
A Soul's Torment
seathinner
5
2.4k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
220
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