Commit Graph

9070 Commits (e19c6245ef95f5e0fdbb2aaf67e6e7c3bb4ba2e4)
 

Author SHA1 Message Date
Phillip Webb 60355e0e11 Fix ResourceHttpRequestHandler delegate
Fix ResourceHttpRequestHandler to set the ServletContext following the
Spring Framework update for SPR-14851.
8 years ago
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
8 years ago
Phillip Webb 57d5a2ebc6 Formatting 8 years ago
Stephane Nicoll 49b244b121 Upgrade to H2 1.4.193
Closes gh-7256
8 years ago
Stephane Nicoll 1a6ab90255 Polish test 8 years ago
Stephane Nicoll 88d95260d3 Merge pull request #7215 from izeye:actuator-hypermedia
* pr/7215:
  Polish contribution
  Update documentation on Actuator hypermedia support
8 years ago
Stephane Nicoll 6d50e26b70 Polish contribution
Closes gh-7215
8 years ago
Johnny Lim 1546cd4072 Update documentation on Actuator hypermedia support
Spring Boot Actuator hypermedia support has been disabled by default via
c7c685f, but its documentation wasn't updated.

This commit updates the documentation related to the change.

See gh-7215
8 years ago
Stephane Nicoll 7f8849c62b Merge branch '1.3.x' into 1.4.x 8 years ago
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
8 years ago
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
8 years ago
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
8 years ago
Andy Wilkinson ee7141cf63 Allow PropertyLauncher loader.path to be configured using manifest
Closes gh-7178
8 years ago
Stephane Nicoll a638dcd51b Remove unnecessary use of System.out.println 8 years ago
Andy Wilkinson 8150cbd0d1 Remove commentary on Neo4j's licence
Closes gh-7214
8 years ago
Andy Wilkinson 2b46a4876f Start building against Spring Framework 4.3.4 snapshots
Closes gh-7174
See gh-7213
8 years ago
Andy Wilkinson be597d7ce9 Fix handling of cyrillic characters in AsciiBytes hashCode method
Closes gh-7202
8 years ago
Stephane Nicoll 713fd51f9c Merge pull request #6954 from vpavic:update-docs
* pr/6954:
  Improve systemd service documentation
8 years ago
Vedran Pavic 469a4e3444 Improve systemd service documentation
Closes gh-6954
8 years ago
Stephane Nicoll 4603d8259a Make MockitoTestExecutionListener public
Closes gh-7016
8 years ago
Stephane Nicoll 2ad3a7f8a3 Merge pull request #7043 from kazuki43zoo:standard-travis-ci
* pr/7043:
  Speed up Travis build
8 years ago
Kazuki Shimizu 7c1f9eb1b9 Speed up Travis build
Modify to use standard mode and directory cache for Travis CI build.

Closes gh-7043
8 years ago
Stephane Nicoll 4ec77d4420 Merge pull request #7193 from izeye:patch-22
* pr/7193:
  Polish contribution
  Add a missing return
8 years ago
Stephane Nicoll a03ce0a9d1 Polish contribution
Add missing test

Closes gh-7193
8 years ago
Johnny Lim 0b5fbbedf4 Add a missing return
This commit adds a missing`return` in `getDataSourceBeanDefinition()`.

See gh-7193
8 years ago
Stephane Nicoll 74d3a6616b Upgrade to liquibase 3.5.3
Closes gh-7208
8 years ago
Stephane Nicoll f3c43e5e1a Merge pull request #6966 from izeye:unused-20160921
* pr/6966:
  Remove unused
8 years ago
Johnny Lim eb7c0e4dc8 Remove unused
Closes gh-6966
8 years ago
Stephane Nicoll 120ece726d Merge pull request #7203 from kdombeck:fix-typo
* pr/7203:
  Correct typo in docs
8 years ago
Ken Dombeck 4621f82b0e Correct typo in docs
Closes gh-7203
8 years ago
Andy Wilkinson 5ebfa4b139 Start building against Spring Integration 4.3.5 snapshots
See gh-7197
8 years ago
Andy Wilkinson 999fa123df Deprecate support for Gradle 2.7 and earlier 8 years ago
Andy Wilkinson 943a054b61 Remove ineffective, premature optimisation from ErrorPageFilter
ErrorPageFilter contained an optimisation for looking up the path
of an error page by exception type. For cases where there was no
mapping for the type of the exception that was thrown but there
was a mapping for one of its super classes, it was intended to
speed up the lookup. Unfortunately, there was a bug in the
implementation which meant that the optimisation had no effect.

Analysis with JMH reveals that for an Exception with a deep type
hierarchy, such as Spring Framework's UnsatisfiedDependencyException,
and an error page mapping for Exception, searching up the hierarchy
until a mapping is found takes 0.0000001s. With the same mapping,
a lookup for Exception takes 0.00000001s, i.e. it's 10x faster.
The optimisation, when correctly implemented, brings the time for
UnsatisfiedDependencyException down to 0.00000001s and into line
with a lookup for Exception. However, the amount of time involved is
so small compared to the overall time spent processing a request that
the added complexity of the optimisation is not justified.

Closes gh-7010
8 years ago
Andy Wilkinson 02e89acd1e Add managed version for kotlin-runtime to spring-boot-parent
See gh-7101
8 years ago
Andy Wilkinson 64d32191cf Ignore Kotlin annotations when creating test context cache key
Every classes that's compiled by Kotlin is annotated with
kotlin.Metadata. The attributes of this annotation always differ so
if they are used in the cache key, context caching will effectively
be disabled.

This commit updates the key used by ImportsContextCustomizer to
ignore the kotlin.Metadata annotation. Additionally, to align with
with Java where annotations in java.lang.annotation are ignored,
annotations in kotlin.annotation are also ignored.

Closes gh-7101
8 years ago
Andy Wilkinson 639b0f554d Suggest the use of @AutoConfigureMockMvc when using WebEnvironment.MOCK
Closes gh-7112
8 years ago
Andy Wilkinson 6ac041c43b Update Thymeleaf 3 related versions in docs and sample
See gh-6991
Closes gh-7183
8 years ago
Andy Wilkinson a531173691 Merge pull request #7183 from Raja Dilip Kolli
* gh-7183:
  Update docs on using Thmyeleaf 3 to reference latest version
8 years ago
Raja Dilip Kolli 4b1ddddea3 Update docs on using Thmyeleaf 3 to reference latest version
Closes gh-7183
8 years ago
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
8 years ago
Andy Wilkinson 24f8c737fb Make relative PID_FOLDER and LOG_FOLDER absolute using jar's directory
Closes gh-7092
Closes gh-7093
8 years ago
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
8 years ago
Andy Wilkinson 7968c6b548 Assign on order to OnPropertyCondition
Closes gh-7144
8 years ago
Andy Wilkinson cc04621dc2 Assign an order to OnResourceCondition
Closes gh-7145
8 years ago
Stephane Nicoll 00a10bcf61 Restore checkstyle
Rather than disabling checkstyle altogether, this commit enables it
again, relaxing the javadoc requirement only.

See gh-7142
8 years ago
Stephane Nicoll 11cad9e0cb Fix sample in ref doc
Closes gh-7142
8 years ago
Stephane Nicoll 0d3318796e Merge branch '1.3.x' into 1.4.x 8 years ago
Stephane Nicoll bd2956c3f0 Fix `metricsFilter` reference in doc
Closes gh-7147
8 years ago
Phillip Webb db3f488d5a Polish 8 years ago
Andy Wilkinson 0333416952 Update WelcomePageHandlerMapping to handle reqs with no Accept header
Closes gh-7138
8 years ago