Commit Graph

24832 Commits

Author SHA1 Message Date
Johnny Lim
f670615b40 Fix TestFailuresPlugin.TestFailure.compareTo()
This commit also polishes around it a bit.

See gh-19863
2020-01-23 13:56:36 +00:00
Andy Wilkinson
1d396abec5 Fix bootBuildImage integration tests on Java 13
We build with Java 8, 11, and 13 without specifying target
compatibility for the bytecode of the app that's placed in the image.
The built image uses Java 11 and when the app is built with Java 13
it fails to start as the Java 11 VM can't read that Java 13 bytecode.

This commit configures the app that's placed in the image to be built
with target compatibility of 1.8. This allows it to be compiled with
all version of Java with which we build and to also be compatible
with the JVM that's in the image.

See gh-19831
2020-01-23 13:50:22 +00:00
Andy Wilkinson
fccc241ded Remove unnecessary dependency from HATEOAS starter
Closes gh-19874
2020-01-23 13:45:18 +00:00
Stephane Nicoll
105db66553 Polish 2020-01-23 14:04:19 +01:00
Stephane Nicoll
e044817fe7 Migrate remaining use of ClassLoader.loadClass to Class.forName
Closes gh-19824
2020-01-23 13:15:45 +01:00
Andy Wilkinson
820c671ddd Configure repositories based on the version that is being built
https://repo.spring.io/snapshot should only be available when
building a BUILD-SNAPSHOT. https://repo.spring.io/milestone should
only be available when not building a RELEASE (a BUILD-SNAPSHOT, Mn,
or RCn).

Closes gh-19700
2020-01-23 11:55:42 +00:00
Andy Wilkinson
01a0a54f78 Include layertools in layered jars build with Gradle
Closes gh-19867
2020-01-23 11:43:19 +00:00
Andy Wilkinson
288f5ceaee Fix zip compression of libs in layered jars
Closes gh-19792
2020-01-23 11:40:13 +00:00
Andy Wilkinson
0bd0b2a6c0 Add support for building OCI images using the Gradle plugin
Closes gh-19831
2020-01-23 10:52:57 +00:00
Andy Wilkinson
bc452bc094 Polish BootJarTests
See gh-19847
See gh-19792
2020-01-23 10:05:33 +00:00
Stephane Nicoll
95be419527 Use Class.forName rather than ClassLoader.loadClass
This commit changes uses of ClassLoader.loadClass to Class.forName for
consistency with what was initiated in #19342 and better compatibility
with GraalVM.

Closes gh-19824
2020-01-23 10:47:53 +01:00
Stephane Nicoll
797c30f952 Merge pull request #19764 from scottfrederick
* pr/19764:
  Upgrade to Kafka 2.4.0 and Spring Kafka 2.4.1

Closes gh-19764
2020-01-23 10:21:47 +01:00
Scott Frederick
8f30cf916f Upgrade to Kafka 2.4.0 and Spring Kafka 2.4.1
See gh-19764
2020-01-23 10:16:36 +01:00
Stephane Nicoll
c80e9f7fc4 Upgrade to Spring Integration 5.3.0.M1
Closes gh-19650
2020-01-23 10:13:40 +01:00
Stephane Nicoll
2b06a423d0 Merge branch '2.2.x'
Closes gh-19873
2020-01-23 09:54:09 +01:00
Stephane Nicoll
c77d4c07d7 Merge branch '2.1.x' into 2.2.x
Closes gh-19872
2020-01-23 09:53:11 +01:00
Stephane Nicoll
c816b00a1a Merge pull request #19855 from protyay
* pr/19855:
  Polish "Encourage use of SpringBootApplication"
  Encourage use of SpringBootApplication

Closes gh-19855
2020-01-23 09:51:50 +01:00
Stephane Nicoll
650e55c242 Polish "Encourage use of SpringBootApplication"
See gh-19855
2020-01-23 09:51:03 +01:00
protyay
3131616c5a Encourage use of SpringBootApplication
See gh-19855
2020-01-23 09:40:30 +01:00
Stephane Nicoll
9aef3ef3a4 Merge branch '2.2.x'
Closes gh-19871
2020-01-23 08:52:37 +01:00
Stephane Nicoll
9c27921a46 Upgrade Java 13 version in CI image
Closes gh-19856
2020-01-23 08:52:07 +01:00
Stephane Nicoll
ff5f8e18ac Merge branch '2.2.x'
Closes gh-19870
2020-01-23 08:50:48 +01:00
Stephane Nicoll
b315bfd87c Merge branch '2.1.x' into 2.2.x
Closes gh-19869
2020-01-23 08:50:21 +01:00
Stephane Nicoll
8dc3e74447 Upgrade Java 8 version in CI image
Closes gh-19857
2020-01-23 08:49:46 +01:00
Phillip Webb
b5b4a02c61 Automatically add jarmode jars when packaging
Update the `Packager` to automatically add the layertools jarmode jar
when producing a layered jar.

Closes gh-19865
2020-01-22 23:14:47 -08:00
Phillip Webb
2b83edeb27 Fix jarmode support in unexploded jars
Update `LaunchedURLClassLoader` to ensure that the `JarModeLauncher`
is created in the correct classloader.

Prior to this commit the launcher was created by the application
classloader and did not have access to any of the required
`org.springframework` classes.

See gh-19848
2020-01-22 23:07:18 -08:00
Phillip Webb
57db621b70 Polish 2020-01-22 23:06:58 -08:00
Phillip Webb
77bbe089b2 Update copyright year of changed files 2020-01-22 20:24:23 -08:00
Phillip Webb
71ce212f7f Rename spring-boot-layertools
Rename `spring-boot-layertools` to `spring-boot-jarmode-layertools`.

Closes gh-19853
2020-01-22 20:24:23 -08:00
Madhura Bhave
13f7db2d8c Write classpath index file from Gradle plugin
Closes gh-19847
2020-01-22 19:32:08 -08:00
Phillip Webb
2198614359 Fix incorrect spring replace due to " change 2020-01-22 17:11:31 -08:00
Scott Frederick
462f5635d6 Reinstate JobLauncherCommandLineRunner
This class was mistakenly marked as deprecated in 2.2.0 instead of deprecated
in 2.3.0. This resulted in the class being deleted as part of the 2.3.0
cleanup.

Putting it back in place now with the correct deprecation noted.

Closes gh-19861
2020-01-22 18:48:55 -06:00
Phillip Webb
e0013454b5 Use parentheses when declaring dependencies
Update all dependencies declarations to use the form `scope(reference)`
rather than `scope reference`.

Prior to this commit we declared dependencies without parentheses unless
we were forced to add them due to an `exclude`.
2020-01-22 16:02:38 -08:00
Phillip Webb
0209cd3e4c Polish quote form used in Gradle scripts
Replace Gradle single quote strings with the double quote form
whenever possible. The change helps to being consistency to the
dependencies section where mostly single quotes were used, but
occasionally double quotes were required due to `${}` references.
2020-01-22 15:49:52 -08:00
Scott Frederick
ed6fbc6bec Remove Spring Cloud Connectors auto-config/starter
The Spring Cloud Connectors project has been deprecated in favor of the
Java CFEnv project. The Boot auto-configuration and starter that support
Connectors were deprecated in Boot 2.2.

This commit removes the Connectors auto-configuration, starter,
and dependency management.

Closes gh-19798
2020-01-22 17:06:32 -06:00
Madhura Bhave
df5b0f1163 Add support for layered jars in gradle plugin
Closes gh-19792

Co-authored-by: Andy Wilkinson <awilkinson@pivotal.io>
2020-01-22 14:53:36 -08:00
Scott Frederick
9ff50f903f Default spring.datasource.generate-unique-name to true
This change ensures that each test in a test suite that shares an
application context gets a unique embedded database, to prevent
inconsistent embedded database state between tests.

Closes gh-16747
2020-01-22 15:41:40 -06:00
Phillip Webb
951d0b0fdf Fix exploded jar classloader issues
Fix a bug in `ExplodedURLClassLoader` and merge the code into the
existing `LaunchedURLClassLoader` class. Also polish a few method
names relating to layer support.

See gh-19848
See gh-19767
2020-01-22 12:56:14 -08:00
Phillip Webb
b4229239ab Protect against NPE in server tests
Update `AbstractApplicationLauncher` to not attempt to shutdown
the process if startup fails.
2020-01-22 12:54:35 -08:00
Phillip Webb
e28338d6cd Rename spring-boot-cloudnativebuildpack
Rename the `spring-boot-cloudnativebuildpack` module to
`spring-boot-buildpack-platform` and update the the package
name to `org.springframework.boot.buildpack.platform`.

Closes gh-19851
2020-01-22 11:01:32 -08:00
Scott Frederick
288889685d Change default BootstrapMode for JPA repositories
Change the default `BootstrapMode` for auto-configured `JpaRepositories`
to `BootstrapMode.DEFERRED` to allow the initialization of
`EntityManagerFactory` to be parallelized for increased startup efficiency.

Prior to this change, the default BootstrapMode for all auto-configured
Spring Data repositories was `BootstrapMode.DEFAULT`.

Closes gh-16230
2020-01-22 10:55:51 -08:00
Andy Wilkinson
ae3bdc79f3 Merge pull request #19850 from dreis2211
* gh-19850:
  Treat Java 11+'s NoSuchFileException the same as FileNotFoundException

Closes gh-19850
2020-01-22 11:45:22 +00:00
dreis2211
23e87f8266 Treat Java 11+'s NoSuchFileException the same as FileNotFoundException
See gh-19850
2020-01-22 11:45:11 +00:00
Andy Wilkinson
adc6444272 Upgrade to Micrometer 1.3.3
Closes gh-19652
2020-01-22 11:24:01 +00:00
Phillip Webb
e513fe4666 Add layertools jarmode
Add a new `spring-boot-layertools` module which provides jarmode support
for working with layers. The module works with both classic fat jars,
as well as layered jars.

Closes gh-19849
2020-01-22 01:26:55 -08:00
Phillip Webb
73a42050d6 Add jarmode support to the loader code
Update the `Launcher` class to allow a packaged jar to be  launched in
a different mode. The launcher now checks for a `jarmode` property and
attempts to find a `JarMode` implementation using the standard
`spring.factories` mechanism.

Closes gh-19848
2020-01-22 01:23:11 -08:00
Phillip Webb
d5a70688cb Reserve layer names for future use
Update layered jar support so that the name `ext` and any name
starting `springboot` are reserved.

See gh-19767
2020-01-22 01:13:54 -08:00
Phillip Webb
3af4930f75 Add cloudnativebuildpack to dependencies
Update the managed dependencies to include the recently added
`spring-boot-cloudnativebuildpack` module.

See gh-19828
2020-01-22 01:10:57 -08:00
Phillip Webb
7d8f8d47c8 Fix packager code to generate layer index file
Update `Packager` to create the layer index file when repackaging.

Closes gh-19767
2020-01-21 23:26:19 -08:00
Phillip Webb
bfd2ca7fd9 Polish Gradle expression references
Expand all expression `$` references to the full `${...}` form.
2020-01-21 18:33:33 -08:00