Commit Graph

11513 Commits

Author SHA1 Message Date
Madhura Bhave
912eb53d7a Clarify configuration class behavior based on bean conditions 2018-07-17 16:37:20 -07:00
Stephane Nicoll
b522199920 Merge pull request #13792 from dreis2211:missing-test-annotation
* pr/13792:
  Add missing @Test in RestarterTests
2018-07-17 08:17:54 +02:00
dreis2211
fba971f47b Add missing @Test in RestarterTests
Closes gh-13792
2018-07-17 08:08:01 +02:00
Stephane Nicoll
fec5ecc5b0 Merge pull request #13779 from izeye:type-utils-line-separator
* pr/13779:
  Remove carriage returns in TypeUtils.getJavaDoc()
2018-07-16 14:11:58 +02:00
Johnny Lim
9fba2c4a62 Remove carriage returns in TypeUtils.getJavaDoc()
Closes gh-13779
2018-07-16 14:11:32 +02:00
Stephane Nicoll
e556c04d83 Remove class file 2018-07-13 09:21:27 +02:00
Stephane Nicoll
6602fa3c90 Clean line breaks in configuration metadata descriptions.
Closes gh-13601
2018-07-13 09:19:17 +02:00
Stephane Nicoll
c23c18dc34 Merge pull request #13755 from izeye:patch-49
* pr/13755:
  Fix typo
2018-07-12 08:51:32 +02:00
Johnny Lim
e7cb1c63bb Fix typo
Closes gh-13755
2018-07-12 08:51:11 +02:00
Andy Wilkinson
6dc14af92d Update view of bean types when an override is detected
Previously, when a bean was overridden and its type changes,
BeanTypeRegistry could be left with a stale view of the bean's type.
This would lead to incorrect bean condition evaluation as conditions
would match or not match based on the bean's old type.

This commit updates the type registry to refresh its view of a bean's
type when its definition changes.

Closes gh-13588
2018-07-11 16:46:37 +01:00
Andy Wilkinson
57ebdab2ab Delay property source initialization till LoggingSystem is initialized
Previously, the initialization of StandardServletEnvironment's
property sources in SpringBootServletInitializer led to debug logging
calls being made before the LoggingSystem had been initialized. As a
result, the system's default configuration was used and, in the case
of Logback at least, the debug logging was output to System.out
in a war deployment.

This commit updates SpringBootServletInitializer to delay the
initialization of StandardServletEnvironment's property sources until
after the LoggingSystem has been initialized, but still in time for
active profiles to be configured via servlet context parameters
(see gh-9972).

Closes gh-13736
2018-07-11 11:47:17 +01:00
Andy Wilkinson
73a08dd668 Avoid overriding beans and ensure import order is used for DataSource
During processing of a configuration class, the class's complete
hierarchy is processed and during the processing of each class its
member classes are processed. Previously, each pool-specific
inner-class of DataSourceConfiguration extended the abstract outer
class. This meant that when the import from
DataSourceAutoConfiguration.PooledDataSourceConfiguration caused the
first pool-specific inner-class to be  processed,
DataSourceConfiguration would be processed as it was the inner-class's
superclass. In turn all of DataSourceConfiguration's member classes
would then be processed. This caused the first import (of
DataSourceConfiguration.Tomcat) to trigger processing of all of the
other pool-specific inner-classes in whatever order they were found
rather than them being processed in the order in which they are
imported by DataSourceAutoConfiguration.PooledDataSourceConfiguration.

Another part of the problem was that none of the pool-specific
inner-classes were conditional on a missing DataSource bean. This
meant that, when multiple pools were on the classpath, each class
after the first would override the previous class's definition of the
DataSource bean.

This commit updates each of the pool-specific inner-classes so that
they no longer extend DataSourceConfiguration. This ensures that
the inner classes are processed in the order defined in the import
on PooledDataSourceConfiguration. Each of the classes has also been
annotated with @ConditionalOnMissingBean(DataSource.class). This
prevents the DataSource bean definition from being overridden and
ensures that the order of precedence for the pool that will be used
is as defined in the import.

Closes gh-13737
2018-07-10 09:45:15 +01:00
Madhura Bhave
8b2cb32ae7 Fix typo 2018-07-09 14:10:31 -07:00
Andy Wilkinson
a50646b7cc Fix repackaging of jars with non-default compression configuration
Previously, if a jar that used custom compression configuration was
repackaged, a failure may occur if an entry in the repackaged jar had
a different compressed size to the entry in the source jar.

This commit updates JarWriter to clear the input entry's compressed
size (by setting it to -1) so that the repackaged entry's compressed
size does not have to match that of the input entry.

Closes gh-13720
2018-07-09 13:16:41 +01:00
Andy Wilkinson
9a49e8ef73 Format Jackson property table so it fits within default page width
Closes gh-13709
2018-07-06 13:48:50 +01:00
Andy Wilkinson
2dd744dfed Upgrade to Git Commit Id Plugin 2.2.4
Closes gh-13640
2018-07-03 13:00:57 +01:00
Andy Wilkinson
ada3d325c3 Upgrade to Maven Enforcer Plugin 1.4.1
Closes gh-13639
2018-07-03 13:00:56 +01:00
Andy Wilkinson
25824a202f Upgrade to Tomcat 8.5.32
Closes gh-13638
2018-07-03 13:00:55 +01:00
Andy Wilkinson
3a793c655a Upgrade to Httpcore 4.4.10
Closes gh-13637
2018-07-03 13:00:55 +01:00
Andy Wilkinson
6219ea27e8 Remove unwanted override of resource plugin's version
Closes gh-13607
2018-06-28 14:41:35 +01:00
Andy Wilkinson
205bb764d5 Specify ID for cache providers section in reference docs
Closes gh-13551
2018-06-25 13:11:18 +01:00
Andy Wilkinson
2f952fde6c Polish 2018-06-25 12:39:31 +01:00
Andy Wilkinson
454de0bfd7 Polish 2018-06-25 12:01:17 +01:00
Andy Wilkinson
953df7cf86 Merge pull request #13559 from Dmitry Sergeyev
* gh-13559:
  Polish “Close Database to reset Connection's auto commit property”
  Close Database to reset Connection's auto commit property
2018-06-25 11:07:47 +01:00
Andy Wilkinson
24d5209738 Polish “Close Database to reset Connection's auto commit property”
Closes gh-13559
2018-06-25 11:02:31 +01:00
dmsergeevp44
3498a91259 Close Database to reset Connection's auto commit property
Previously, LiquibaseEndpoint closed the JdbcConnection but did not
close the Database. When using a connection pool, this could leave the
underlying SQL Connection with its auto commit property set to false.

This commit updates LiquibaseEndpoint to close the Database. This
ensures that it resets that Connection's auto commit property to the
value that it had when the Database was configured to use the
Connection.

See gh-13559
2018-06-25 10:58:51 +01:00
Andy Wilkinson
f32c66d0e1 Merge pull request #12859 from ralenmdp
* gh-12859:
  Polish "Fix JSP availability check when not running as a packaged war"
  Fix JSP availability check when not running as a packaged war
2018-06-21 17:30:24 +01:00
Andy Wilkinson
b1d8cc55fc Polish "Fix JSP availability check when not running as a packaged war"
Closes gh-12859
2018-06-21 17:30:12 +01:00
Mandap
82465cf435 Fix JSP availability check when not running as a packaged war
See gh-12859
2018-06-21 17:21:00 +01:00
Andy Wilkinson
b35e1ad232 Avoid unbounded metrics creation for requests not handled by Spring MVC
Previously, if an HTTP request that used a templated URI was handled
by something other than Spring MVC, a potentially unbounded number of
metrics would be created. This happened because, in the absence of
Spring MVC's best matching pattern attribute, MetricsFilter would fall
back to using the request's path. If the handling route was templated,
MetricsFilter would be unaware and would record different metrics for
each different path, rather than a single metric for the matching
pattern.

This cimmit updates MetricsFilter so that it falls back to using
unmapped when Spring MVC's best matching pattern attribute is not
available. This ensures that an unbounded number of metrics will no
longer be created, at the cost of losing specific metrics for requests
that are not handled by Spring MVC and that do not use a templated
path.

Closes gh-5875
2018-06-21 15:10:47 +01:00
Andy Wilkinson
29e87257b4 Provide Gradle example for using Log4j2
Closes gh-12729
2018-06-21 12:16:12 +01:00
Andy Wilkinson
8a0f0354df Disable Log4J2's shutdown hook by default
Log4J2 enables its shutdown hook by default. When the JVM is exiting,
this creates a race between logging that happens during the
application context being closed and Log4J2 being shut down such that
the logging is lost.

This commit updates SpringBootConfigurationFactory so that it
produces a custom sub-class of DefaultConfiguration that disables the
shutdown hook by default. In addition to solving the problem described
above, this also aligns the Log4J2 logging system with the
logging.register-shutdown-hook property which defaults to false.

Closes gh-11360
2018-06-21 11:35:20 +01:00
Stephane Nicoll
36605b3b49 Polish
See gh-13534
2018-06-21 09:16:44 +02:00
Andy Wilkinson
9f7106c778 Polish 2018-06-20 18:56:14 +01:00
Andy Wilkinson
6cc0968b8d Polish 2018-06-20 16:52:18 +01:00
Phillip Webb
2bb7a430cf Clean up access logging threads when Undertow is stopped
Closes gh-12742
2018-06-20 14:15:21 +01:00
Andy Wilkinson
e7b03f7ca3 Don't auto-configure MultipartConfigElement when using Commons FileUpload
Previously, when a user had declared a custom MultipartResolver bean
that is a CommonsMultipartResolver, part resolution would fail. The
failure was occurring as the servlet container was consuming the parts
before CommonsMultipartResolver had a chance to read them. This was
happening because a MultipartConfigElement was being auto-configured.

This commit updates the multipart auto-configuration so that a
MultipartConfigElement is not auto-configured when there is a
CommonsMultipartResolver bean in the context.

Closes gh-7735
2018-06-20 12:05:23 +01:00
Andy Wilkinson
92f62043d4 Fix placeholder support in <springProfile>'s name attribute
Closes gh-13450
2018-06-20 10:48:55 +01:00
Andy Wilkinson
6081db5c34 Make ZipHeaderInputStream read sub 5 byte entries correctly
Closes gh-13525
2018-06-19 19:48:14 +01:00
Stephane Nicoll
99f993bc82 Add tests for JndiConnectionFactoryAutoConfiguration
Closes gh-13526
2018-06-19 20:47:23 +02:00
Stephane Nicoll
af126b1bb3 Fixup version numbers following release 2018-06-14 12:34:39 +02:00
Spring Buildmaster
36b8639853 Next Development Version 2018-06-14 10:05:31 +00:00
Stephane Nicoll
dc4691fd7f Merge pull request #13438 from vtintillier:remove-junit-dependency
* pr/13438:
  Polish "Exclude JUnit from json-simple"
  Exclude JUnit from json-simple
2018-06-14 08:35:50 +02:00
Stephane Nicoll
6e5ae0c71d Polish "Exclude JUnit from json-simple"
Closes gh-13438
2018-06-14 08:33:28 +02:00
Vivien Tintillier
e9aa6dd29f Exclude JUnit from json-simple
See gh-13438
2018-06-14 08:32:28 +02:00
Stephane Nicoll
93804eeb24 Upgrade to Spring Integration 4.3.17
Closes gh-13458
2018-06-14 08:26:15 +02:00
Stephane Nicoll
f030073ce2 Upgrade to Spring Data Ingalls SR13
Closes gh-13456
2018-06-13 20:00:21 +02:00
Andy Wilkinson
9c1da51f73 Upgrade to Jetty 9.4.11.v20180605
Closes gh-13464
2018-06-13 10:51:16 +01:00
Andy Wilkinson
634101a333 Upgrade to Jackson 2.8.11.20180608
Closes gh-13463
2018-06-13 10:51:16 +01:00
Andy Wilkinson
b8247f363d Upgrade to Spring Security 4.2.7.RELEASE
Closes gh-13196
2018-06-13 09:35:11 +01:00