Commit Graph

7141 Commits

Author SHA1 Message Date
Phillip Webb
3172d434a7 Polish
Closes gh-6835
2016-09-16 13:31:54 -07:00
Andy Wilkinson
faab9047d6 Start building against Spring Framework 4.2.8 snapshots
See gh-6910
2016-09-16 19:25:51 +01:00
Stephane Nicoll
c2cdc1424b Polish documentation
Add an explicit note that states that "spring.datasource.url" (or more
specifically "spring.datasource.class-name" that is inferred from the
former) is necessary to connect to a database. If the class-name isn't
specified, Spring Boot will attempt to auto-configure an embedded
database.

Closes gh-6907
2016-09-16 16:58:39 +02:00
Andy Wilkinson
30cb15a0d5 Update docs to note that Gradle 3 is not supported
Breaking API changes in Gradle 3.0 make it impossible to support
it reliably alongside Gradle 1 and 2 without mainintaining multiple
versions of our Gradle plugin. This commit updates the documentation
to note that Gradle 3 is not supported.

Closes gh-6880
2016-09-15 14:01:53 +01:00
Andy Wilkinson
b8833c40b6 Allow spring.config.location to be configured via servlet context
Previously, in a war deployment, the web environment’s property sources
were initialized using the servlet context after the application’s
configuration had been read by ConfigFileApplicationListener. This
meant that spring.config.location configured via the servlet context
had no effect.

This commit adds a new ApplicationListener,
ServletContextApplicationListener, that initialises the configurable
web environment’s property sources using the servlet context. It’s
ordered with higher precedence than ConfigFileApplicationListener to
ensure that any properties defined in the servlet context are available
when loading the application’s configuration.

Closes gh-6801
2016-09-15 13:28:23 +01:00
Andy Wilkinson
56cf49665f Add some tests for ServletContextApplicationContextInitializer 2016-09-15 13:14:02 +01:00
Stephane Nicoll
6eb0449aa9 Use BDD mockito
See gh-6869
2016-09-12 16:30:07 +02:00
Stephane Nicoll
b88cb35ea2 Fix JMS health indicator
This commit improves the JMS health indicator to identify a broken broker
that uses failover. An attempt to start the connection is a good way to
make sure that it is effectively available.

Closes gh-6818
2016-09-12 15:59:18 +02:00
Stephane Nicoll
e3ca5e7107 Merge pull request #6847 from htynkn:fix-document-for-trace-end-point
* pr/6847:
  Trace endpoint defaults to 100
2016-09-09 07:43:20 +02:00
Huang YunKun
9cb269d14d Trace endpoint defaults to 100
Closes gh-6847
2016-09-09 07:42:56 +02:00
Stephane Nicoll
8a71ee0eff Merge pull request #6815 from vpavic:polish-javadoc
* pr/6815:
  Polish `HealthEndpoint` javadoc
2016-09-05 09:00:36 +02:00
Vedran Pavic
b88889f020 Polish HealthEndpoint javadoc
Closes gh-6815
2016-09-05 09:00:08 +02:00
Andy Wilkinson
20df899b7a Merge pull request #6759 from hengyunab
* gh-6759:
  Polish “Avoid null handler package in JarFile protocol handler registration”
  Avoid null handler package in JarFile protocol handler registration
2016-08-31 13:52:21 +01:00
Andy Wilkinson
eb1c349f97 Polish “Avoid null handler package in JarFile protocol handler registration”
See gh-6759
2016-08-31 13:50:26 +01:00
hengyunabc
33a81e87d1 Avoid null handler package in JarFile protocol handler registration
Closes gh-6759
2016-08-31 13:44:41 +01:00
Andy Wilkinson
63b8e82c10 Update OnBeanCondition to consider hierarchy for PARENTS search strategy
Closes gh-6762
2016-08-31 13:28:08 +01:00
Stephane Nicoll
c8632f12f6 Clarify scope of Guava's CacheLoader
Closes gh-6778
2016-08-31 10:47:41 +02:00
Phillip Webb
69e96c6211 Polish 2016-08-29 15:29:54 +01:00
Stephane Nicoll
97f15d606d Auto-detect fork value in stop goal
So far, one has to set the "fork" value to both the start and stop
goals. Since they have the same name, sharing them in a global
configuration element does the trick. However, the plugin also supports
auto-detection of the fork value according to other parameters:
typically if an agent or jvm arguments are set, forking will be
automatically enabled. This is a problem since the stop goal is not aware
of that.

This commit transmits the value in a property attached to the
`MavenProject`. That way, the stop goal can retrieve that value and
apply the same defaults. This has the side effect that specifying the
fork value isn't necessary anymore.

Closes gh-6747
2016-08-27 12:33:44 +02:00
Andy Wilkinson
a5c6b0954d Consider ancestors when finding primary beans for ConditionalOnSingleCandidate
Closes gh-6559
2016-08-26 17:29:47 +01:00
Andy Wilkinson
75c1e50c5a Improve type determination for factory beans during condition evaluation
Previously, BeanTypeRegistry did not correctly determine the type
that would be created by a factory bean if that factory bean was
returned from a bean method with arguments on a configuration class
found via component scanning.

The key difference is that bean definitions for bean methods on
configuration classes found via component scanning use ASM-based
metadata rather than reflection-based metadata. The ASM-based method
data does not provide direct access to the Method that will create the
bean. In this case, BeanTypeRegistry was falling back to looking for
a method with the matching name and no arguments. Therefore, if
the bean method had any arguments it would fail to find the method
and would, therefore, be unable to determine the type of bean
produced by the factory bean.

This commit updates BeanTypeRegistry to use logic that is very similar
to Spring Framework's ConstructorResolver's
resolveFactoryMethodIfPossible method to locate the method that will
produce the factory bean. It looks for a single method with
the required name with any number of arguments. If it finds multiple
methods with the required name and different arguments it returns
null, just as ConstructorResolver does.

Closes gh-6755
2016-08-26 13:46:56 +01:00
Andy Wilkinson
1dc231f771 Use Hamcrest's containsString matcher rather than Mockito's 2016-08-22 15:48:44 +01:00
Andy Wilkinson
ba51dc5c4a Make configuration of Liquibase’s logging more robust
We make Liquibase aware of our custom Commons Logging-based logger by
adding its package to the Liquibase ServiceLocator’s packages to scan.
Previously, this was happening too late so Liquibase may have already
initialized and cached a particular logger.

This commit moves the registration of the extra package from the
Liquibase auto-configuration to the application listener that customises
Liquibase’s ServiceLocator. This ensures that the package is added
before Liquibase is used. Unfortunately, configuring Liquibase’s
ServiceLocator and its packages to scan causes it to try to perform
some logging, resulting in it caching the wrong type of logger. We
work around this problem by resetting Liquibase’s LogFactory once we’ve
finished setting everything up.

Closes gh-6713
2016-08-22 14:58:34 +01:00
Andy Wilkinson
9300c6d422 Merge pull request #6683 from hengyunab
* gh-6683:
  Test that LaunchedURLClassLoader works when thread is interrupted
  Ensure that LaunchedURLClassLoader works when thread is interrupted
2016-08-18 13:30:21 +01:00
Andy Wilkinson
85c0b44dcb Test that LaunchedURLClassLoader works when thread is interrupted
Previously, RandomAccessDataFile used a semaphore and acquired it
interruptibly. This meant that an interrupted thread was unable to
access the file. Notably, this would prevent LaunchedURLClassLoader from
loading classes or resources on an interrupted thread.

The previous commit (937f857) updates RandomAccessDataFile to acquire
the semaphore uninterruptibly. This commit adds a test to
LaunchedURLClassLoader to verify that it can now load a resource from
an interrupted thread.

Closes gh-6683
2016-08-18 12:03:05 +01:00
hengyunabc
937f85765c Ensure that LaunchedURLClassLoader works when thread is interrupted
See gh-6683
2016-08-18 11:59:45 +01:00
Andy Wilkinson
ffc0dc44ed Make Flyway and Liquibase endpoints conditional on a single candidate
Previously, auto-configuration of the Flyway and Liquibase endpoints
would fail if there were multiple Flyway or Spring Liquibase beans
in the application context.

This commit updates them so that they are now conditional on a single
candidate.

Closes gh-6609
2016-08-15 13:43:03 +01:00
Andy Wilkinson
a240fbae0d Merge pull request #6623 from Nick Pillitteri
* gh-6623:
  Use 'travis_wait' to prevent Travis CI from aborting builds
2016-08-12 13:24:13 +01:00
Nick Pillitteri
45d3f002f5 Use 'travis_wait' to prevent Travis CI from aborting builds
Builds use the '-q' flag to suppress most output due to a limit of 4MB
of logs on Travis CI. However, Travis will also abort builds that
don't generate any output for 10 minutes. Thus we also use the
'travis_wait' function to make sure builds aren't aborted for up to
30 minutes.

Fixes gh-6621
Closes gh-6623
2016-08-12 13:23:48 +01:00
Andy Wilkinson
ae6182a964 Update requiresUnpack documentation of unpack location
The unpack location is (largely) an implementation detail and the
Repackage Mojo was the only place where it was explicity documented.
Rather than updating the outdated location, this commit removes it
entirely to avoid encouraging people to rely on the location.

Closes gh-6624
2016-08-12 12:07:47 +01:00
Phillip Webb
a49f309ec1 Call afterProperties set in LogFileMvcEndpoint
Call afterPropertiesSet on the delegate `ResourceHttpRequestHandler`
to prevent an NPE. This change is required for compatibility with
Spring Framework 4.3 following SPR-13834.

Closes gh-6592
2016-08-11 16:11:29 +01:00
Andy Wilkinson
cec6015f8a Cope with null server or management port when creating curie provider
Previously, a NullPointerException would occur if
endpoints.docs.curies.enabled was true and the default value was being
used for either server.port or management.port.

EndpointWebMvcHypermediaManagementContextConfiguration has been
restructured to ensure that the DocsMvcEndpoint bean is defined before
the condition on its existence is evaluated. Previously this was
dependant on the class’s bean methods being processed in a particular
ordering, something that would be ok when using ASM but would vary when
using reflection.

Closes gh-6584
2016-08-08 17:16:00 +01:00
Stephane Nicoll
f186008d1f Fix Groovy version in INSTALL.txt
This commit uses maven filtering to set the Groovy version rather than an
hard-coded value that can be easily outdated.

Closes gh-6530
2016-08-01 13:49:28 -07:00
Stephane Nicoll
29cd3c42e1 Fixup version numbers following release 2016-07-28 11:46:55 +02:00
Spring Buildmaster
a89ef5df6e Next Development Version 2016-07-28 09:18:40 +00:00
Andy Wilkinson
7e116f6bab Upgrade to thymeleaf-extras-conditionalcomments 2.1.2.RELEASE
Closes gh-6480
2016-07-26 21:20:45 +01:00
Andy Wilkinson
4a40f8d5c4 Upgrade to Postgresql 9.4.1209.jre7
Closes gh-6468
2016-07-26 20:38:23 +01:00
Andy Wilkinson
9a02252ee6 Upgrade to Freemarker 2.3.25-incubating
Closes gh-6467
2016-07-26 20:37:39 +01:00
Andy Wilkinson
11ce8d79ad Upgrade to Jetty 9.2.18.v20160721
Closes gh-6466
2016-07-26 20:30:45 +01:00
Andy Wilkinson
f3353be428 Merge pull request #6458 from Artem Bilan
* gh-6458:
  Upgrade to Spring Integration 4.2.9.RELEASE
2016-07-26 15:09:53 +01:00
Artem Bilan
5969c5dcc5 Upgrade to Spring Integration 4.2.9.RELEASE
Closes gh-6458
2016-07-26 15:08:27 +01:00
Phillip Webb
e8bedacc91 Remove optional from json-simple managed dependency
Update `spring-boot-dependencies` so that `json-simple` does not include
an `<option>true</optional>` element.

Fixes gh-6450
2016-07-25 10:15:19 -07:00
Phillip Webb
8e22f47916 Don't limit collection sizes in property binding
Update PropertiesConfigurationFactory so that collections can grow
beyond 256 items. Prior to this commit configuration property binding
used the default `DataBinder.autoGrowNestedPaths` setting of 256.

Fixes gh-6436
2016-07-25 10:13:24 -07:00
Andy Wilkinson
6a8620ac38 Update instructions for signing the CLA 2016-07-20 08:53:39 +01:00
Andy Wilkinson
197f67c867 Correct OpenShift instructions to use action_hooks not action_scripts
Closes gh-6419
2016-07-20 07:05:38 +01:00
Andy Wilkinson
a22071724a Make it clearer that unconfigured WebSecConfigAdapter matches any path
Closes gh-5046
2016-07-19 12:07:45 +01:00
Andy Wilkinson
e1950e34c6 Include cause when throwing exception due to unreadable manifest
Closes gh-6417
2016-07-19 08:48:04 +01:00
Phillip Webb
49676ee986 Polish 2016-07-18 14:31:23 -07:00
Phillip Webb
2cb38bc8e2 Apply Log4J2LoggingSystem.FILTER to main config
Update Log4J2LoggingSystem so that the FILTER is applied to the main
configuration and not to the root logger. Prior to this commit calls
to `logger.isErrorEnabled()` would not consider the filter and hence
would always return `true`. This caused `SpringApplication` to silently
swallow exceptions.

Fixes gh-5271
2016-07-18 14:26:11 -07:00
Phillip Webb
3c67ecca61 Downgrade to HSQLDB 2.3.3
Closes gh-6415
2016-07-18 13:07:00 -07:00