Resource handling support for Spring Web Reactive

A straight-forward port of the resource handling support in
spring-webmvc to spring-web-reactive. Primarily adapting contracts and
implementations to use the reactive request and response and the
reactive ResourceHttpMessageWriter.

Issue: SPR-14521
This commit is contained in:
Rossen Stoyanchev
2016-09-03 02:52:55 -04:00
parent 108ebe0f2b
commit 1ae64bfbd3
59 changed files with 5450 additions and 6 deletions

View File

@@ -0,0 +1,17 @@
CACHE MANIFEST
# this is a comment
CACHE:
bar.css
foo.css
//example.org/style.css
NETWORK:
*
CACHE:
js/bar.js
http://example.org/image.png
FALLBACK:
/main /static.html

View File

@@ -0,0 +1,4 @@
THIS DOES NOT START WITH "CACHE MANIFEST"
CACHE:
bar.css

View File

@@ -0,0 +1,3 @@
@import url("http://example.org/fonts/css");
body { background: url("file:///home/spring/image.png") }
figure { background: url("//example.org/style.css")}

View File

@@ -0,0 +1,10 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Foo</title>
</head>
<body>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

View File

@@ -0,0 +1 @@
function foo() { console.log("hello bar"); }

View File

@@ -0,0 +1 @@
function foo() { console.log("hello world"); }

View File

@@ -0,0 +1,9 @@
@import url("bar.css");
@import url('bar.css');
@import url(bar.css);
@import "foo.css";
@import 'foo.css';
body { background: url("images/image.png") }

View File

@@ -0,0 +1 @@
function foo() { console.log("hello world"); }