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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
750
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
クラウドネイティブなエンジニアに向ける Raycastの魅力と実際の活用事例
nealle
2
230
[RubyKaigi 2026] Require Hooks
palkan
1
270
The Less-Told Story of Socket Timeouts
coe401_
3
870
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
350
実践CRDT
tamadeveloper
0
610
20年以上続くプロダクトでも使い続けられる静的解析ツールを求めて
matsuo_atsushi
0
110
ソフトウェア設計の結合バランス #phperkaigi
kajitack
0
170
Claude Code × Gemini × Ebitengine ゲーム制作素人WebエンジニアがGoでゲームを作った話
webzawa
0
210
アクセシビリティ試験の"その後"を仕組み化する
yuuumiravy
1
180
Explore CoroutineScope
tomoeng11
0
140
ソースコード→AST→オペコード、の旅を覗いてみる
o0h
PRO
0
110
AIベース静的検査器の偽陽性率を抑える工夫3選
orgachem
PRO
4
380
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
100
6.1k
Navigating Team Friction
lara
192
16k
Ethics towards AI in product and experience design
skipperchong
2
260
Fireside Chat
paigeccino
42
3.9k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.7k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1k
Embracing the Ebb and Flow
colly
88
5k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.2k
Color Theory Basics | Prateek | Gurzu
gurzu
0
300
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
270
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
210
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