Commit Graph

10499 Commits

Author SHA1 Message Date
Phillip Webb 72dd3b5628 Merge branch '2.2.x' into 2.3.x
Closes gh-24747
2021-01-11 14:21:56 -08:00
Phillip Webb f9e3e0d532 Register default resource path using a Resource
Update `WebMvcAutoConfiguration` so that the default "/" resource path
is registered directly as a `ServletContextResource`.

Closes gh-24745
2021-01-11 14:20:46 -08:00
Andy Wilkinson 7625a979db Configure bootRun to use project's Java toolchain by default
Previously, unlike the application plugin's run task, our bootRun task
ignored the project's Java toolchain. This meant that the application
was run on a JVM with the same Java version as the one being used by
Gradle itself. This could result in a failure if the application
required a more modern JVM.

This commit updates the plugin to configure the bootRun task's
JavaLauncher convention to be one derived from the project's Java
toolchain. Toolchain support was introduced in Gradle 6.7 so this is
only done when using Gradle 6.7 and later.

Fixes gh-24517
2021-01-11 11:21:53 +00:00
Andy Wilkinson 064de4e073 Check configured JavaLauncher when determining version of the JVM
Previously, bootRun assumed that the Java version of the JVM that would
run the application would be the same as the Java version of the JVM
that is running the build. This assumption does not hold true when
Gradle's toolchain support is used to configure tasks that fork a new
JVM to use a version other than that being used by Gradle itself.

This commit updates the BootRun task to query the JavaLauncher property
when determining the version of Java on which the application will be
run. Toolchain support and the JavaLauncher property are new in Gradle
6.7. To support earlier versions of Gradle, NoSuchMethodError is caught
we continue as if no JavaLauncher has been configured and use the local
JVM's Java version.

Fixes gh-24512
2021-01-11 10:36:16 +00:00
Andy Wilkinson 5ad4d627fd Fix classpath index so entries match those expected by the launcher
This reverts commit ad164269e9 and adds
some additional tests.

Fixes gh-24192
2021-01-08 15:32:19 +00:00
Stephane Nicoll 826d79be3e Clarify behaviour of WebServerFactory in reference guide
Closes gh-24705
2021-01-08 15:50:16 +01:00
Scott Frederick a302238e21 Remove layout parameters from build-image Maven goal
This commit removes the `layout` and `layoutFactory` parameters
from the `build-image` goal in the Maven plugin while retaining
them for the `repackage` goal. The `build-image` goal currently
only supports jar archives, so allowing other layout types to be
configured for the goal could cause confusion.

Fixes gh-24105
2021-01-07 15:59:02 -06:00
Phillip Webb 7cbd57b635 Log FailureAnalyzer errors at trace level
Update `FailureAnalyzers` to log errors at `trace` rather than `debug`.
This should reduce noise when an analyzer unexpectedly fails and the
user is running with `--debug`.

Fixes gh-24630
2021-01-06 17:29:24 -08:00
Phillip Webb a24ec9d372 Merge branch '2.2.x' into 2.3.x 2021-01-06 17:01:22 -08:00
Phillip Webb 46629ef5e4 Migrate away from pivotal-legacy/homebrew-tap
Update formula to use spring-boot rather than springboot. This will
allow both taps to be used at the same time.

See gh-24659
2021-01-06 16:58:05 -08:00
Phillip Webb ef09982b39 Merge branch '2.2.x' into 2.3.x
Closes gh-24680
2021-01-06 16:46:50 -08:00
Phillip Webb 25033ee5e7 Migrate away from pivotal-legacy/homebrew-tap
Update reference documentation to the new spring-io/homebrew-tap repo.

Closes gh-24659
2021-01-06 16:45:10 -08:00
Madhura Bhave 73a2a4b383 Consider context-path for WebTestClient baseUrl
Fixes gh-24168
2021-01-06 16:42:09 -08:00
Phillip Webb 52e47c4275 Fix test for JSR-350 @Nonnull
Closes gh-24647
2021-01-06 12:33:25 -08:00
Phillip Webb 848ed65f5b Add test for JSR-350 @Nonnull
Closes gh-24647
2021-01-06 12:04:58 -08:00
Stephane Nicoll 67d1f355d7 Fix Nullable reference
See gh-24647
2021-01-06 14:23:38 +01:00
Stephane Nicoll 2bd78355dc Reference javax.annotation.Nonnull support in reference guide
See gh-24647
2021-01-06 08:58:13 +01:00
Phillip Webb 9b9c3edfcd Polish "Return -1 port for non-listening WebServers"
See gh-24606
2021-01-05 16:02:26 -08:00
Stefan Partusch 5c61df3131 Return -1 port for non-listening WebServers
Update `WebServer` implementations to return -1 from `getPort()` if
the server  isn't listening on a port. This aligns the implementations
with the interface Javadoc.

See gh-24606
2021-01-05 15:56:25 -08:00
Phillip Webb 2ad9a47d08 Support JSR-305 annotations on endpoint methods
Update `OperationMethodParameter` to additionally support JSR-305 based
`@Nullable` annotations.

Closes gh-24647
2021-01-05 14:07:22 -08:00
dreis2211 fe3217d2c4 Exclude starters from Javadoc aggregation
See gh-24648
2021-01-05 17:12:39 +00:00
Stephane Nicoll f33c7bc27c Polish "Remove unnecessary semicolon"
See gh-24628
2021-01-05 08:24:03 +01:00
Andrey Kolchanov 097104584c Remove unnecessary semicolon
See gh-24628
2021-01-05 08:15:32 +01:00
Madhura Bhave 9928d74a9e Revert fix to enable cors for actuator endpoints
The fix causes a Jersey application to fail in the absence
of a `CorsFilter` or `CorsConfigurationSource` bean.

See gh-11987
2021-01-04 12:25:43 -08:00
dreis2211 261b7a5b18 Update copyrights to 2021
See gh-24625
2021-01-01 09:17:13 +01:00
Stephane Nicoll d0a1c49873 Polish
See gh-24604
2020-12-23 16:07:27 +01:00
Stephane Nicoll d86eba3b6b Upgrade to Thymeleaf 3.0.12
Closes gh-24599
2020-12-23 10:57:36 +01:00
Madhura Bhave b29ac37db6 Add docs about using InMemoryOAuth2AuthorizedClientService
Closes gh-24596
2020-12-22 12:18:47 -08:00
Stephane Nicoll 9e5a6c5228 Harmonize references to ActiveMQ Artemis
Closes gh-24586
2020-12-22 09:44:49 +01:00
Stephane Nicoll 306b964ce3 Fix multi-release JAR test on JDK 16
See gh-24453
2020-12-21 09:59:01 +01:00
izeye 97dd4c0871 Polish
See gh-24558
2020-12-21 09:35:41 +01:00
Madhura Bhave b82f5a408a Add a note about disabling git info
See gh-24205
2020-12-18 18:02:27 -08:00
Madhura Bhave a5c8b84511 Update version of git-properties plugin in the docs
Closes gh-24567
2020-12-18 17:25:26 -08:00
Madhura Bhave 302ba77812 Improve documentation regarding git commit info
Closes gh-24205
2020-12-18 17:13:30 -08:00
Madhura Bhave c9a09cf6a9 Clarify when SpEL expressions in application properties are evaluated
Closes gh-24531
2020-12-18 14:15:27 -08:00
Madhura Bhave 1db271c2c5 Reorder documentation about building images
Closes gh-24560
2020-12-18 14:02:29 -08:00
Phillip Webb c4e41305d5 Prevent Tomcat URL "reflective access" warnings
Update the jar `Handler` class to support a non-reflective fallback
mechanism when possible. The updated code attempts to capture a regular
jar URL before our handler is installed. It can then use that URL as
context when creating the a fallback URL. The JDK jar `Handler` will
be copied from the context URL to the fallback URL.

Without this commit, resolving new Tomcat URLs of the form
`jar:war:file:...` would result in an ugly "Illegal reflective access"
warning.

Fixes gh-18631
2020-12-17 20:43:41 -08:00
Madhura Bhave 361198ebba Fix tests
See gh-11987
2020-12-16 15:25:02 -08:00
Madhura Bhave 09e07428cc Configure CORS in default security configuration for MVC
Fixes gh-11987
2020-12-16 14:55:36 -08:00
Scott Frederick e4d124dc45 Improve error message with Maven build-image and war packaging
Fixes gh-24522
2020-12-16 15:58:53 -06:00
dreis2211 0ec603cdad Avoid duplicates in MergedContextConfiguration
Remove duplicate config attribute classes by using a `Set` rather
than a `List` in the `SpringBootTestContextBootstrapper`.

See gh-24532
2020-12-16 12:50:54 -08:00
Scott Frederick 0e5df2296e Fail with Gradle bootBuildImage and war packaging
Prior to this commit, running the bootBuildImage Gradle task on a
project configured for war packaging would result in a jar file being
built and used in the image instead of the war file. With this commit
an error will be thrown from the plugin in this case.

Fixes gh-24521
2020-12-16 13:23:43 -06:00
Phillip Webb 29300530c6 Polish 2020-12-15 19:44:40 -08:00
Andy Wilkinson 76198f9a8d Include properties from test-autoconfigure in config props appendix
Closes gh-24486
2020-12-15 17:20:21 +00:00
Stephane Nicoll 26e7e61919 Merge branch '2.2.x' into 2.3.x
Closes gh-24494
2020-12-14 16:19:23 +01:00
Stephane Nicoll 60f526add0 Remove links to Jetty API and documentation
This commit removes links to Jetty API and documentation as those links
are breaking every time the Jetty team releases a new version

See https://github.com/eclipse/jetty.project/issues/4546

Closes gh-24493
2020-12-14 16:17:25 +01:00
Stephane Nicoll 0533ac58fb Test the Gradle plugin against 6.7.1
Closes gh-24449
2020-12-10 15:33:37 +01:00
Stephane Nicoll ab99de4349 Polish
See gh-24418
2020-12-10 13:52:11 +01:00
Stephane Nicoll 94b6b62077 Upgrade to Undertow 2.1.5.Final
Closes gh-24441
2020-12-10 09:03:03 +01:00
Stephane Nicoll 30748b8dd0 Upgrade to Tomcat 9.0.41
Closes gh-24440
2020-12-10 09:03:02 +01:00