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
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
160
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
170
Open-sourcing http://spring.io
bclozel
1
670
Other Decks in Programming
See All in Programming
継続モナドとリアクティブプログラミング
yukikurage
3
670
人間の目はかわらない、だからJPEGは30年もつ
yuzneri
12
17k
torikago - Ruby::Boxで照らすモジュラモノリスの実行境界
se4weed
1
280
Prismを使った型安全な暗号化_関数型まつり2026
_fhhmm
0
160
Generative UI & AI-Assistants for Your Angular Solutions
manfredsteyer
PRO
1
280
Welcome to the "Parametricity" 🏙️ − Generic だけど Specific な世界 −
guvalif
PRO
1
190
信頼性について考えてみる(SRE NEXT 2026 miniLT)
hayama17
0
230
Built Our Own Background Agent at LayerX #aidevex_findy
layerx
PRO
9
3.8k
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
140
PHPだって関数型したい 〜できること、できないこと〜 / fp-in-php
jsoizo
1
260
Laravel Boostに学ぶ、AIにPHPを書かせる技術 〜OSSの実装から蒸留するエージェント制御の王道〜
kentaroutakeda
3
580
AIが無かった頃の素敵な出会いの話
codmoninc
1
300
Featured
See All Featured
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.5k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
470
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.4k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
370
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
450
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
510
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
780
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.7k
My Coaching Mixtape
mlcsv
0
180
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
230
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
390
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