Skip to content

Commit 48da952

Browse files
committed
Polish
1 parent 68189f3 commit 48da952

File tree

2 files changed

+34
-34
lines changed

2 files changed

+34
-34
lines changed

framework-docs/modules/ROOT/pages/web/webflux-functional.adoc

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -802,25 +802,25 @@ Java::
802802
+
803803
[source,java,indent=0,subs="verbatim,quotes",role="primary"]
804804
----
805-
ClassPathResource index = new ClassPathResource("static/index.html");
806-
List<String> extensions = List.of("js", "css", "ico", "png", "jpg", "gif");
807-
RequestPredicate spaPredicate = path("/api/**").or(path("/error")).or(pathExtension(extensions::contains)).negate();
808-
RouterFunction<ServerResponse> redirectToIndex = route()
809-
.resource(spaPredicate, index)
810-
.build();
805+
ClassPathResource index = new ClassPathResource("static/index.html");
806+
List<String> extensions = List.of("js", "css", "ico", "png", "jpg", "gif");
807+
RequestPredicate spaPredicate = path("/api/**").or(path("/error")).or(pathExtension(extensions::contains)).negate();
808+
RouterFunction<ServerResponse> redirectToIndex = route()
809+
.resource(spaPredicate, index)
810+
.build();
811811
----
812812
813813
Kotlin::
814814
+
815815
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
816816
----
817-
val redirectToIndex = router {
818-
val index = ClassPathResource("static/index.html")
819-
val extensions = listOf("js", "css", "ico", "png", "jpg", "gif")
820-
val spaPredicate = !(path("/api/**") or path("/error") or
821-
pathExtension(extensions::contains))
822-
resource(spaPredicate, index)
823-
}
817+
val redirectToIndex = router {
818+
val index = ClassPathResource("static/index.html")
819+
val extensions = listOf("js", "css", "ico", "png", "jpg", "gif")
820+
val spaPredicate = !(path("/api/**") or path("/error") or
821+
pathExtension(extensions::contains))
822+
resource(spaPredicate, index)
823+
}
824824
----
825825
======
826826

@@ -835,16 +835,16 @@ Java::
835835
+
836836
[source,java,indent=0,subs="verbatim,quotes",role="primary"]
837837
----
838-
Resource location = new FileSystemResource("public-resources/");
839-
RouterFunction<ServerResponse> resources = RouterFunctions.resources("/resources/**", location);
838+
Resource location = new FileSystemResource("public-resources/");
839+
RouterFunction<ServerResponse> resources = RouterFunctions.resources("/resources/**", location);
840840
----
841841
842842
Kotlin::
843843
+
844844
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
845845
----
846-
val location = FileSystemResource("public-resources/")
847-
val resources = router { resources("/resources/**", location) }
846+
val location = FileSystemResource("public-resources/")
847+
val resources = router { resources("/resources/**", location) }
848848
----
849849
======
850850

framework-docs/modules/ROOT/pages/web/webmvc-functional.adoc

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -780,25 +780,25 @@ Java::
780780
+
781781
[source,java,indent=0,subs="verbatim,quotes",role="primary"]
782782
----
783-
ClassPathResource index = new ClassPathResource("static/index.html");
784-
List<String> extensions = List.of("js", "css", "ico", "png", "jpg", "gif");
785-
RequestPredicate spaPredicate = path("/api/**").or(path("/error")).or(pathExtension(extensions::contains)).negate();
786-
RouterFunction<ServerResponse> redirectToIndex = route()
787-
.resource(spaPredicate, index)
788-
.build();
783+
ClassPathResource index = new ClassPathResource("static/index.html");
784+
List<String> extensions = List.of("js", "css", "ico", "png", "jpg", "gif");
785+
RequestPredicate spaPredicate = path("/api/**").or(path("/error")).or(pathExtension(extensions::contains)).negate();
786+
RouterFunction<ServerResponse> redirectToIndex = route()
787+
.resource(spaPredicate, index)
788+
.build();
789789
----
790790
791791
Kotlin::
792792
+
793793
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
794794
----
795-
val redirectToIndex = router {
796-
val index = ClassPathResource("static/index.html")
797-
val extensions = listOf("js", "css", "ico", "png", "jpg", "gif")
798-
val spaPredicate = !(path("/api/**") or path("/error") or
799-
pathExtension(extensions::contains))
800-
resource(spaPredicate, index)
801-
}
795+
val redirectToIndex = router {
796+
val index = ClassPathResource("static/index.html")
797+
val extensions = listOf("js", "css", "ico", "png", "jpg", "gif")
798+
val spaPredicate = !(path("/api/**") or path("/error") or
799+
pathExtension(extensions::contains))
800+
resource(spaPredicate, index)
801+
}
802802
----
803803
======
804804

@@ -813,16 +813,16 @@ Java::
813813
+
814814
[source,java,indent=0,subs="verbatim,quotes",role="primary"]
815815
----
816-
Resource location = new FileSystemResource("public-resources/");
817-
RouterFunction<ServerResponse> resources = RouterFunctions.resources("/resources/**", location);
816+
Resource location = new FileSystemResource("public-resources/");
817+
RouterFunction<ServerResponse> resources = RouterFunctions.resources("/resources/**", location);
818818
----
819819
820820
Kotlin::
821821
+
822822
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
823823
----
824-
val location = FileSystemResource("public-resources/")
825-
val resources = router { resources("/resources/**", location) }
824+
val location = FileSystemResource("public-resources/")
825+
val resources = router { resources("/resources/**", location) }
826826
----
827827
======
828828

0 commit comments

Comments
 (0)