Commit Graph

841 Commits

Author SHA1 Message Date
Andy Wilkinson 22e456a177 Merge branch '1.4.x' into 1.5.x 2016-11-15 13:14:30 +00:00
Andy Wilkinson c2730ac63f Polish formatting and address warnings 2016-11-15 11:48:35 +00:00
Spring Buildmaster e712a9ba8c Next Development Version 2016-11-08 16:55:37 +00:00
Andy Wilkinson 3a2d9e31ff Merge branch '1.4.x' into 1.5.x 2016-11-08 10:36:56 +00:00
Andy Wilkinson 808185ab4e Make LaunchedURLClassLoader Java 6 compatible again
Closes gh-7334
2016-11-08 10:35:18 +00:00
Andy Wilkinson e576225959 Merge branch '1.4.x' into 1.5.x 2016-11-08 10:03:58 +00:00
dreis 7a797909ae Reinstate LaunchedURLClassLoader's registration as parallel capable
Closes gh-7334
2016-11-08 09:58:14 +00:00
Andy Wilkinson ef3395beaa Raise the minimum supported version of Gradle to 2.9
Closes gh-6884
2016-11-01 16:25:02 +00:00
Andy Wilkinson 20e8c36590 Merge branch '1.4.x' into 1.5.x 2016-11-01 14:26:18 +00:00
Andy Wilkinson 6828997651 Correct minimum recommended version of Gradle to be 2.9 rather than 2.8
Closes gh-7189
See gh-6884
2016-11-01 14:25:07 +00:00
Phillip Webb 5b66ffbb4b Merge branch '1.4.x' into 1.5.x 2016-10-31 23:09:36 -07:00
Phillip Webb 97fee46682 Revert Layout changes
This reverts commits:
- 974ec92ad6.
- 537e0c12c2.
- 500a3df6e9.
2016-10-31 21:08:15 -07:00
Andy Wilkinson cdcc3d2f28 Ensure getResources("") includes nested root URLs
Previously, if Boot's JarURLConnection pointed to the root of a nested
entry, e.g. /BOOT-INF/classes, a call to getInputStream() would throw
an IOException. This behavior is reasonable for a URL that points
to the root of a normal jar as the jar itself is on the class path
anyway. However, for a nested jar it meant that a call to
ClassLoader.getResources("") would not include URLs for any nested
jars and directories (/BOOT-INF/classes and jars in /BOOT-INF/lib).
This is due to some logic in URLClassPath.Loader.findResource that
verifies a URL by opening a connection and calling getInputStream().

The result of missing URLs for the root of nested jars and directories
is that classpath scanning that scans from the root (not a good idea
for performance reasons, but something that we should support) would
not find entries in /BOOT-INF/classes or in jars in /BOOT-INF/lib.

This commit updates our JarURLConnection so that it no longer throws
an IOException when asked for an InputStream for the root of a nested
entry (directory or jar).

Fixes gh-7003
2016-10-31 12:06:35 -07:00
Phillip Webb 57d5a2ebc6 Formatting 2016-10-31 11:41:45 -07:00
Johnny Lim 7bb63238ab Fix typo
Closes gh-7253
2016-10-31 11:37:52 +01:00
Stephane Nicoll 974ec92ad6 Fix broken build 2016-10-31 10:37:57 +01:00
Dave Syer 537e0c12c2 Support for custom layout types to change loader classes
A layout can
also optionally change the loader jar that is unpacked in the root
of the repackaged archive by implementing a new method in Layout.
2016-10-30 11:24:29 +00:00
Dave Syer 500a3df6e9 Add LayoutFactory in spring.factories
Instead of a fixed enum of layout types, user can provide custom
layouts via implementations of LayoutFactory in spring.factories.
2016-10-30 11:24:29 +00:00
Stephane Nicoll f6959ccbcd Merge branch '1.4.x' into 1.5.x 2016-10-28 13:31:38 +02:00
Stephane Nicoll 7f8849c62b Merge branch '1.3.x' into 1.4.x 2016-10-28 13:31:19 +02:00
Stephane Nicoll 5863e6f78c Fix class name in generated meta-data
Previously, the algorithm that computes the String representation of a
class reference and a property type was shared. This lead to generic
information for group's `type` and `sourceType` property.

This commit separates that logic in two: `getQualifiedName` is now
responsible to generate a fully qualified class name while the existing
`getType` is solely responsible to generate a type representation for the
property. Only the latter has generic information.

Closes gh-7236
2016-10-28 13:23:47 +02:00
Andy Wilkinson 6b3eede59f Merge branch '1.4.x' into 1.5.x 2016-10-26 12:13:26 +01:00
Andy Wilkinson 6a68c8f7e0 Restore Handler logic that was changed during its merge
This commit restores the logic in Handler that was changed when
d20ac56a was merged, while leaving the structural improvements intact.

In addition to a couple of changes where a typo meant the wrong
variable was being referenced, some logic branches now return false
rather than called super. This realigns our Handler's behaviour with
that of the JDK's.

Some more tests have also been added to try to catch the problems that
were introduced during the merge.

Closes gh-7021
2016-10-26 11:10:38 +01:00
Phillip Webb 3c5328924c Merge branch '1.4.x' into 1.5.x 2016-10-25 20:17:55 -07:00
Andy Wilkinson d20ac56afd Align our jar URL stream handler with the JDK's
Previously our handler didn't override parseURL or sameFile which
resulted in behaviour that differed from that of the JDK's handler.
Crucially, this would result in our JarURLConnection being passed
a spec that didn't contain a "!/". A knock-on effect of this was
that the connection would point to the root of the jar rather than
the intended entry.

Closes gh-7021
2016-10-25 20:16:32 -07:00
Andy Wilkinson 5b9eaab6c0 Merge branch '1.4.x' into 1.5.x 2016-10-24 22:16:23 +01:00
Andy Wilkinson ee7141cf63 Allow PropertyLauncher loader.path to be configured using manifest
Closes gh-7178
2016-10-24 22:14:56 +01:00
Stephane Nicoll ae4dd0d17e Merge branch '1.4.x' into 1.5.x 2016-10-24 18:08:23 +02:00
Stephane Nicoll a638dcd51b Remove unnecessary use of System.out.println 2016-10-24 18:07:40 +02:00
Andy Wilkinson 9abafb839b Merge branch '1.4.x' into 1.5.x 2016-10-24 12:20:23 +01:00
Andy Wilkinson be597d7ce9 Fix handling of cyrillic characters in AsciiBytes hashCode method
Closes gh-7202
2016-10-24 12:19:57 +01:00
Andy Wilkinson d7e2708687 Merge branch '1.4.x' into 1.5.x 2016-10-19 16:51:14 +01:00
Andy Wilkinson 999fa123df Deprecate support for Gradle 2.7 and earlier 2016-10-19 16:50:35 +01:00
Andy Wilkinson b7c55fb192 Merge branch '1.4.x' into 1.5.x 2016-10-18 13:47:20 +01:00
Andy Wilkinson a31180dd68 Avoid calling URL.getContent() when defining a package
URL.getContent() is shorthand for URL.openConnection().getContent().
It creates an InputStream that isn't explicitly closed. This means
that a file handle remains open until the URLConnection is garbage
collected. This can lead to the process exceeding the limit for open
files.

Previously, LaunchedURLClassLoader was using getConent() when
proactively defining a package for a class that is about to be loaded.
getContent() was used to access nested jar files to check if they
contained the package and, if so, to retrieve the jar's manifest.

In place of using getContent(), this commit uses JarURLConnection's
getJarFile() method which provides access to the JarFile without the
unwanted side-effect of opening an input stream.

Closes gh-7180
2016-10-18 13:35:33 +01:00
Stephane Nicoll 6186262ecc Switch `excludeDevtools` to true by default
Switch the default value of `excludeDevtools` from `false` to `true` as
it is more sensible to exclude such dependency by default.

Closes gh-7170
2016-10-17 17:52:12 +03:00
Andy Wilkinson 899b8a04cb Merge branch '1.4.x' into 1.5.x 2016-10-14 09:20:02 +01:00
Andy Wilkinson 24f8c737fb Make relative PID_FOLDER and LOG_FOLDER absolute using jar's directory
Closes gh-7092
Closes gh-7093
2016-10-14 09:19:11 +01:00
Andy Wilkinson 57b7357be7 Merge branch '1.4.x' into 1.5.x 2016-10-13 16:55:21 +01:00
Andy Wilkinson 03deff9a1c Handle relative pid folder correctly in the launch script
Previously, a relative PID folder was not handled correctly when
running stop, status, or force_reload. This meant that a service
could be started when configured to use a relative pid file, but
then could not be stopped.

The PID folder should be treated as relative to the service's jar
file. This commit updates stop, status, and force_reload to push the
jar file's directory so that this is now the case for those three
commands.

Closes gh-7092
2016-10-13 16:51:54 +01:00
Phillip Webb d818a09ed8 Polish 2016-10-11 23:38:14 -07:00
Stephane Nicoll 28ed59ca6e Polish contribution
Closes gh-6645
2016-10-11 15:36:35 +02:00
Plamen Totev 3cccc732df Add workingDirectory option for Maven plugin run/start
Add configuration option that specifies the working directory to use to
run/start the application via the Maven plugin.

Closes gh-6243
2016-10-11 15:36:27 +02:00
Stephane Nicoll c06dc33bf6 Generate deprecated meta-data for deprecated @Bean methods
This commit makes sure that a meta-data group exposed via a deprecated
`@Bean` method is deprecated as well. This also works if the class
in which the bean method is defined is itself deprecated.

Closes gh-7100
2016-10-06 17:08:49 +02:00
Andy Wilkinson fe10ea73b0 Merge branch '1.4.x' into 1.5.x 2016-10-05 14:58:42 +01:00
Andy Wilkinson ad3e5c04bb Add a second, portal-compatible ID to the Gradle plugin
To be compatible with Gradle's plugin portal, plugins must have an
ID that uses a reverse domain name. This means that spring-boot is
not compatible.

This commit introduces a new ID, org.springframework.boot, and
deprecates the old ID.

Closes gh-6997
2016-10-05 14:58:26 +01:00
Phillip Webb a2315378d4 Formatting 2016-10-03 22:44:36 -07:00
Stephane Nicoll cdd59707fc Merge branch '1.4.x' into 1.5.x 2016-09-28 17:00:30 +02:00
Johnny Lim 30a677646f Polish
Closes gh-7030
2016-09-28 16:45:19 +02:00
Stephane Nicoll 9210bf0822 Merge branch '1.4.x' into 1.5.x 2016-09-27 10:14:37 +02:00