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
380
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
250
Intro à Spring Boot
bclozel
0
170
Cloud native apps with Spring Cloud
bclozel
1
750
HTTP2 for the web developer devoxx
bclozel
0
210
HTTP2 for the web developer
bclozel
1
170
Inside http://spring.io
bclozel
1
410
Intro to Spring Boot
bclozel
4
2.8k
Inside spring.io: a production spring reference application
bclozel
0
180
Open-sourcing http://spring.io
bclozel
1
670
Other Decks in Programming
See All in Programming
PyConJP2026_wat_Python × Signal Processing: How to Draw Pictures with Sound Using Spectrogram Art
wat
0
670
Claude Codeを組織的に動かして月400PRを実現した話
happy_ryo
0
260
Hello, Hiroshima Geospatial Data! — Exploring DoboX with Python
ra0kley
0
170
20260828_品質と開発生産性を両立させる、AI時代のE2Eテストの考え方
magicpod
0
160
変化を抱擁するドキュメントの作り方 - ビジネスルール駆動開発がもたらす、コードとの新しい関係
ioki
2
120
高専、大学編入、そして未踏へ〜プロダクト開発とキャリアの歩み - Technical College, University Transfer, and On to “Mitou” / My Journey in Product Development and Career
pkmiya
0
140
片田舎のおっさん、 Swift Buildのダイアモンド問題解決の不具合修正PRを出すが、解決方法がキャッシュをしないようにすることであり、ビルド時間が伸びると言われてマージされないので高速化もする/swiftbuild
yimajo
0
360
kubernetes コンポーネント開発入門 / 新卒N年目の勉強会&交流会!〜〇〇への誘い〜 #n_study
mazrean
0
170
デプロイ直後のレイテンシスパイクを調べたら、 Railsの仕様にたどり着いた
nhsykym
0
110
ALB ログから Trace を気合で繋げる技術
fohte
7
880
Gmail/Google DriveをトリガーにAIエージェントを動かそう! / Run AI agents with Gmail/Google Drive as triggers!
har1101
3
470
週末にAI-DLCを本気で回したら$1,600溶けた
hbashimizu
0
130
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Claude Code のすすめ
schroneko
67
230k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
670
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
How STYLIGHT went responsive
nonsquared
100
6.3k
Faster Mobile Websites
deanohume
310
32k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.7k
Fireside Chat
paigeccino
42
4k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
230
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
560
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.8k
Marketing to machines
jonoalderson
1
5.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