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
オフライン対応!Flutterアプリに全文検索エンジンを実装する @FlutterKaigi2025
itsmedreamwalker
1
150
Honoを技術選定したAI要件定義プラットフォームAcsimでの意思決定
codenote
0
130
Designing Repeatable Edits: The Architecture of . in Vim
satorunooshie
0
260
OSS開発者の憂鬱
yusukebe
6
3k
Promise.tryで実現する新しいエラーハンドリング New error handling with Promise try
bicstone
2
210
ボトムアップの生成AI活用を推進する社内AIエージェント開発
aku11i
0
1.6k
CSC509 Lecture 11
javiergs
PRO
0
300
自動テストを活かすためのテスト分析・テスト設計の進め方/JaSST25 Shikoku
goyoki
2
560
チーム開発の “地ならし"
konifar
4
2.7k
AI駆動開発ライフサイクル(AI-DLC)のホワイトペーパーを解説
swxhariu5
0
480
AsyncSequenceとAsyncStreamのプロポーザルを全部読む!!
s_shimotori
1
270
Researchlyの開発で参考にしたデザイン
adsholoko
0
120
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
Navigating Team Friction
lara
190
15k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.6k
The World Runs on Bad Software
bkeepers
PRO
72
12k
The Invisible Side of Design
smashingmag
302
51k
How to Ace a Technical Interview
jacobian
280
24k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Fireside Chat
paigeccino
41
3.7k
What's in a price? How to price your products and services
michaelherold
246
12k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
GitHub's CSS Performance
jonrohan
1032
470k
Six Lessons from altMBA
skipperchong
29
4.1k
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