You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Unresolved directive in <stdin> - include::https:///raw.githubusercontent.com/spring-cloud/spring-cloud-build/main/docs/modules/ROOT/partials/building.adoc[]
30
+
:jdkversion: 17
31
+
32
+
[[basic-compile-and-test]]
33
+
== Basic Compile and Test
34
+
35
+
To build the source you will need to install JDK {jdkversion}.
36
+
37
+
Spring Cloud uses Maven for most build-related activities, and you
38
+
should be able to get off the ground quite quickly by cloning the
39
+
project you are interested in and typing
40
+
41
+
----
42
+
$ ./mvnw install
43
+
----
44
+
45
+
NOTE: You can also install Maven (>=3.3.3) yourself and run the `mvn` command
46
+
in place of `./mvnw` in the examples below. If you do that you also
47
+
might need to add `-P spring` if your local Maven settings do not
48
+
contain repository declarations for spring pre-release artifacts.
49
+
50
+
NOTE: Be aware that you might need to increase the amount of memory
51
+
available to Maven by setting a `MAVEN_OPTS` environment variable with
52
+
a value like `-Xmx512m -XX:MaxPermSize=128m`. We try to cover this in
53
+
the `.mvn` configuration, so if you find you have to do it to make a
54
+
build succeed, please raise a ticket to get the settings added to
55
+
source control.
56
+
57
+
The projects that require middleware (i.e. Redis) for testing generally
58
+
require that a local instance of [Docker](https://www.docker.com/get-started) is installed and running.
59
+
60
+
[[documentation]]
61
+
== Documentation
62
+
63
+
The spring-cloud-build module has a "docs" profile, and if you switch
64
+
that on it will try to build asciidoc sources using https://docs.antora.org/antora/latest/[Antora] from
65
+
`modules/ROOT/`.
66
+
67
+
As part of that process it will look for a
68
+
`docs/src/main/asciidoc/README.adoc` and process it by loading all the includes, but not
69
+
parsing or rendering it, just copying it to `${main.basedir}`
70
+
(defaults to `$\{basedir}`, i.e. the root of the project). If there are
71
+
any changes in the README it will then show up after a Maven build as
72
+
a modified file in the correct place. Just commit it and push the change.
73
+
74
+
[[working-with-the-code]]
75
+
== Working with the code
76
+
If you don't have an IDE preference we would recommend that you use
77
+
https://www.springsource.com/developer/sts[Spring Tools Suite] or
78
+
https://eclipse.org[Eclipse] when working with the code. We use the
79
+
https://eclipse.org/m2e/[m2eclipse] eclipse plugin for maven support. Other IDEs and tools
80
+
should also work without issue as long as they use Maven 3.3.3 or better.
81
+
82
+
[[activate-the-spring-maven-profile]]
83
+
=== Activate the Spring Maven profile
84
+
Spring Cloud projects require the 'spring' Maven profile to be activated to resolve
85
+
the spring milestone and snapshot repositories. Use your preferred IDE to set this
86
+
profile to be active, or you may experience build errors.
87
+
88
+
[[importing-into-eclipse-with-m2eclipse]]
89
+
=== Importing into eclipse with m2eclipse
90
+
We recommend the https://eclipse.org/m2e/[m2eclipse] eclipse plugin when working with
91
+
eclipse. If you don't already have m2eclipse installed it is available from the "eclipse
92
+
marketplace".
93
+
94
+
NOTE: Older versions of m2e do not support Maven 3.3, so once the
95
+
projects are imported into Eclipse you will also need to tell
96
+
m2eclipse to use the right profile for the projects. If you
97
+
see many different errors related to the POMs in the projects, check
98
+
that you have an up to date installation. If you can't upgrade m2e,
99
+
add the "spring" profile to your `settings.xml`. Alternatively you can
100
+
copy the repository settings from the "spring" profile of the parent
101
+
pom into your `settings.xml`.
102
+
103
+
[[importing-into-eclipse-without-m2eclipse]]
104
+
=== Importing into eclipse without m2eclipse
105
+
If you prefer not to use m2eclipse you can generate eclipse project metadata using the
106
+
following command:
107
+
108
+
[indent=0]
109
+
----
110
+
$ ./mvnw eclipse:eclipse
111
+
----
112
+
113
+
The generated eclipse projects can be imported by selecting `import existing projects`
114
+
from the `file` menu.
115
+
31
116
32
117
[[contributing]]
33
118
= Contributing
@@ -224,7 +309,7 @@ Spring Cloud Build brings along the `basepom:duplicate-finder-maven-plugin`, th
224
309
[[duplicate-finder-configuration]]
225
310
=== Duplicate Finder configuration
226
311
227
-
Duplicate finder is *enabled by default* and will run in the `verify` phase of your Maven build, but it will only take effect in your project if you add the `duplicate-finder-maven-plugin` to the `build` section of the projecst's `pom.xml`.
312
+
Duplicate finder is *enabled by default* and will run in the `verify` phase of your Maven build, but it will only take effect in your project if you add the `duplicate-finder-maven-plugin` to the `build` section of the project's `pom.xml`.
Copy file name to clipboardExpand all lines: spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/config/GatewayAutoConfiguration.java
+1
Original file line number
Diff line number
Diff line change
@@ -210,6 +210,7 @@ public StringToZonedDateTimeConverter stringToZonedDateTimeConverter() {
Copy file name to clipboardExpand all lines: spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/handler/predicate/QueryRoutePredicateFactory.java
+38-5
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,7 @@
20
20
importjava.util.List;
21
21
importjava.util.function.Predicate;
22
22
23
+
importjakarta.validation.constraints.AssertTrue;
23
24
importjakarta.validation.constraints.NotEmpty;
24
25
25
26
importorg.springframework.util.StringUtils;
@@ -40,21 +41,26 @@ public class QueryRoutePredicateFactory extends AbstractRoutePredicateFactory<Qu
Copy file name to clipboardExpand all lines: spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/route/builder/PredicateSpec.java
0 commit comments