Commit Graph

6930 Commits (f3aa236e922efc20159167160df907f0e082b0bc)
 

Author SHA1 Message Date
Andy Wilkinson 681a866cce Exclude Java agents from class loader created by PropertiesLauncher
PropertiesLauncher creates a ClassLoader that is used by the Launcher
to load an application’s classes. During the creation of this
ClassLoader URLs from its ClassLoader. This resulted resulting in Java
agents that are added to the system class loader via the -javaagent
launch option being available on both the system class loader and the
created class loader. Java agents are intended to always be loaded by
the system class loader. Making them available on another class loader
breaks this model.

This is the same problem that was in ExecutableArchiveLauncher and
that was fixed in ee08667e (see gh-863).

This commit updates PropertiesLauncher so that it skips the URLs of
any Java agents (found by examining the JVM’s input arguments) when
copying URLs over to the new ClassLoader, thereby ensuring that Java
agents are only ever loaded by the system class loader.

Closes gh-4911
9 years ago
Andy Wilkinson 24fd503743 Merge branch '1.2.x' 9 years ago
Andy Wilkinson b99739212a Correct the name of MySQL's XADataSource implementation
Closes gh-4942
9 years ago
Phillip Webb 13db85f84b Add ExitCodeExceptionMapper support
Add ExitCodeExceptionMapper strategy interface which can be used to map
exceptions to exit codes.

Closes gh-4803
9 years ago
Andy Wilkinson 487a66a75f Resend SIGTERM if app is still running 30 seconds after first attempt
Previously, the default launch script would send SIGTERM once and then
wait for up to 60 seconds for the app to have stopped. If the service
was stopped immediately after being started the first SIGTERM would
occasionally be ignored (presumably because the JVM was not yet in a
state to handle it) causing the service stop request to fail.

This commit updates the launch script to resend SIGTERM to the process
if it's still running 30 seconds after the first SIGTERM was sent.

Closes gh-4941
9 years ago
Andy Wilkinson 3afd0c7b3b Address Shellcheck warning (SC2086) for $arguments in launch script
$arguments needs to be split on spaces so it can’t just be wrapped
in quotes. This commit updates arguments to be an array that is then
expanded ("{arguments[@]}"). The use of @ and double quotes means that
it is expanded into all elements individually quoted.

See gh-4866
9 years ago
Andy Wilkinson 27a81e1463 Complete static final logger changes that were started in ec2f33f9
This commit completes the changes to consistently used static final
fields for Log instances that were started in ec2f33f9. Specifically it:

 - Removes this. when accessing logger fields that are now static
 - Renames some fields from log to logger
 - Makes some logger fields static

See gh-4784
9 years ago
Andy Wilkinson 150a6f0f5c Switch off Security Filter auto-config when spring-security-config is absent
SecurityFilterAutoConfiguration uses SecurityProperties which uses
SessionCreationPolicy from spring-security-config. This commit makes
SecurityFilterAutoConfiguration conditional on SessionCreationPolicy,
thereby preventing a startup failure if spring-security-web is on the
classpath but spring-security-config is not.

Closes gh-4919
9 years ago
Phillip Webb 152ee95261 Polish 9 years ago
Andy Wilkinson 0fd4af8179 Merge branch 'launch-script' 9 years ago
Andy Wilkinson d1b47c8a8f Add integration tests for default launch script
This commit adds a suit of integration tests for the launch script. See
the accompanying README.adoc for further details.

Closes gh-4872
9 years ago
Andy Wilkinson c39a55a270 Fix quoting of start-stop-daemon RUN_ARGS and JAVA_OPTS in launch script
81a4763 introduced a regression when multiple RUN_ARGS or JAVA_OPTS were
configured. Rather than the JVM being launched with multiple arguments
all of the RUN_ARGS or JAVA_OPTS were passed as a single argument. This
caused unexpected behaviour and typically caused the application to fail
to start.

This commit updates the quoting of the arguments the are supplied when
launching the app using start-stop-daemon so that space-separated
entries in RUN_ARGS and JAVA_OPTS remain separate.

Closes gh-4866
9 years ago
Andy Wilkinson 04fe55a2ab Improve portability by using type instead of which in the launch script
Previously, the launch script used which to determine the availability
of start-stop-daemon. which isn’t available by default on all OSs.
For example, it’s not available by default on CentOS 5.

This commit updates the launch script to use type when determining if
start-stop-daemon is available. This improves the portability of the
script and makes the use of type consistent throughout the script.

Closes gh-4925
9 years ago
Andy Wilkinson a1e0f2f5f0 Update launch script to wait for pid to be written to pid file
Previously, the launch script would wait for the pid file to exist
before continuing. This didn’t work 100% of the time as it left a 
window where the file had been created but the PID had not been written
to it that could result in an incorrect report of the app failing to
start.

This commit updates the script to wait for the file to have a size
greater than zero before continuing. This ensures that the pid has
been written to the file before the pid is read from the file and used
to check that the process is running.

Closes gh-4923
9 years ago
Andy Wilkinson c1c62c1692 Add dependency management for jackson-jaxrs-json-provider
Closes gh-4932
9 years ago
Phillip Webb a20cd2de02 Publish ExitCodeEvent when possible
Update SpringApplication to publish an ExitCodeEvent when a valid exit
code is known.

Fixes gh-4804
9 years ago
Phillip Webb 7397dbaf57 Allow ExitCodeGenerator to be used on Exceptions
Update exit code support to allow the ExitCodeGenerator interface to
be placed on an Exception. Any uncaught exception implementing the
interface and returning a non `0` status will now trigger a System.exit
with the code.

Fixes gh-4803
9 years ago
Phillip Webb d2fed8bb07 Polish 9 years ago
Stephane Nicoll 57b99f0b63 Upgrade to Undertow 1.3.12.Final
Closes gh-4821
9 years ago
Stephane Nicoll 11d4c2c180 Merge pull request #4831 from mrumpf/gh-4822
* pr/4831:
  Fixed the check whether Log4j2 is available on the classpath
9 years ago
mrumpf 1f5291cd84 Fixed the check whether Log4j2 is available on the classpath
In Spring Boot 1.3.1 the class 'org.apache.logging.log4j.LogManager'
is used to check which logging backend is in use. But this class is
part of the log4j-api.jar and not part of the log4j-core.jar.
That means the check is invalid, as it does not detect the actual
core implementation of Log4j2 correctly.

When you want to redirect Log4j2 logging via SLF4J, a NPE occurs
each time the application is reloaded by the devtools, because the
class Log4j2RestartListener tries to shutdown Log4j2 resources.
This is done by accessing some internal shutdown method via
reflection. The method that is being looked for does not exist
when the log4j-api.jar is available only on the classpath,
resulting in a NPE. This causes the application to stop,
disappearing from the Spring Boot Dashboard in Eclipse

Closes gh-4831
9 years ago
Stephane Nicoll 6b4e4e652a Clarify annotation processor config with AspectJ
Closes gh-4847
9 years ago
Andy Wilkinson 2aff82bb64 Merge branch '1.2.x' 9 years ago
Andy Wilkinson 6117b6c5c8 Consistent use of tabs for indentation in pom files 9 years ago
Andy Wilkinson e4e9a71753 Merge branch '1.2.x' 9 years ago
Andy Wilkinson 8410e545b5 Upgrade copyright headers for 2016 9 years ago
Stephane Nicoll d8384c52df Add a reference to start.spring.io 9 years ago
Stephane Nicoll 72754c27b2 Allow to override BasicBatchConfigurer
Issue #4533 was supposed to make BasicBatchConfigurer public again but
unfortunately only the class visibility was changed. This commit makes
sure it can be overridden.

Closes gh-4888
9 years ago
Phil Webb 9f41323030 Update CONTRIBUTING.adoc
Update the Oomph instructions.
9 years ago
Andy Wilkinson a6c0f07376 Merge branch '1.2.x' 9 years ago
zhanhb fae3397f92 Upgrade to JavaMail 1.5.5
Closes gh-4844
9 years ago
Stephane Nicoll d51d84303f Merge pull request #4867 from kazuki43zoo/fix-invalid-port-in-doc
* pr/4867:
  Fix invalid port number in doc
9 years ago
Kazuki Shimizu 908c9562e5 Fix invalid port number in doc
Closes gh-4867
9 years ago
Dave Syer 9510938120 Make springIntegrationPublicMetrics conditional on bean by name not type
By type is too restrictive and surprising for users who wanted to add their
own MetricReaderPublicMetrics for other reasons.
9 years ago
Stephane Nicoll a835912c04 Merge branch '1.2.x' 9 years ago
Stephane Nicoll b94c7c6a1d Guard instantiation of Tomcat's ErrorPage
Closes gh-4839
9 years ago
Stephane Nicoll b1c2226e23 Merge branch '1.2.x'
# Conflicts:
#	spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/websocket/WebSocketAutoConfiguration.java
9 years ago
Stephane Nicoll 12cefd2c2b Only enable Tomcat's websocket support on Java7+
Tomcat's websocket support requires Java7 or later. That commit makes
sure to register its support only when such requirement is met.

Closes gh-4846
9 years ago
Stephane Nicoll a87a1f053f Polish documentation
Clarify that "spring.config.*" properties doesn't work in configuration
files.

Closes gh-4838
9 years ago
Stephane Nicoll a9a3de5a51 Merge pull request #4829 from joshiste/issue-4820
* pr/4829:
  Change redirect in initscript to support old bash
9 years ago
Johannes Edmeier 832ad2fe85 Change redirect in initscript to support old bash
`&>>` syntax is bash version 4. This fix allows to support older
versions.

Fixes gh-4820
Closes gh-4829
9 years ago
Stephane Nicoll cdc91330f2 Merge pull request #4837 from izeye/20151224
* pr/4837:
  Polish test
9 years ago
Johnny Lim c39df05652 Polish test
Closes gh-4837
9 years ago
Stephane Nicoll 3e25d99f4e Add test to validate `log42-spring.xml` location
See gh-4809
9 years ago
Andy Wilkinson c3328721a1 Merge branch '1.2.x' 9 years ago
Andy Wilkinson 835a11b52a Start building against Spring WS 2.2.5 snapshots
See gh-4789
9 years ago
Dave Syer d493d3afe7 Make Log4J logging system consistent with the others
when the logname is empty it replaces it with the root logger name.

Fixes gh-4808
9 years ago
Stephane Nicoll ecf56f0708 Fixup version numbers following release 9 years ago
Spring Buildmaster 8db59059a5 Next Development Version 9 years ago
Stephane Nicoll 7caf39400c Merge pull request #4806 from izeye/polish-20151218
* pr/4806:
  Fix typos
9 years ago