Commit Graph

2738 Commits

Author SHA1 Message Date
Andy Wilkinson
eed58eecb4 Improve error handling in EnableAutoConfigurationImportSelector
Previously, EnableAutoConfigurationImportSelector assumed that it
would always find auto-configuration attributes from an
@EnableAutoConfiguration annotation. This assumption does not hold
true in certain circumstances, although exactly what those
circumstances are is unclear. It could occur if the import selector
were used directly, but it's package-private making that unlikey. In
such circumstances a NullPointerException was being thrown.

This commit asserts that the attributes are non-null and, should the
assertion fail, produces an error that is more helpful than an NPE.

Closes gh-1512
2014-09-16 15:56:22 +01:00
Andy Wilkinson
468b6cb1f7 Add support for configuring RemoteIpValve’s internalProxies
Closes gh-1522
2014-09-16 15:40:18 +01:00
Phillip Webb
5ba86a103d Polish 2014-09-15 11:35:16 -07:00
Andy Wilkinson
2ba2cfe23d Document build-time property expansion using Gradle
Closes gh-1540
2014-09-15 16:25:00 +01:00
Andy Wilkinson
3c815f4014 Provide group in ResolvedArtifactLibrary to enable discrimination
The fix for gh-1475 introduced the use of an artifact's group to
discriminate between two libraries with the same name (artifact id)
and version. However, in the case of Gradle, a group name was not
provided for libraries that have been resolved from a repository.

This commit updates ResolvedArtifactLibrary to use the group obtained
from the underlying ResolvedArtifact as its discriminator.

Fixes gh-1543
2014-09-15 15:40:29 +01:00
Dave Syer
6456f2a542 Add url,user,password to LiquibaseProperties
User can set those properties (optionally) to use a different
DataSource than the default.

Fixes gh-1558
2014-09-15 08:30:58 -05:00
Dave Syer
7828f2a5d3 Update docs on metrics names 2014-09-13 11:00:55 -05:00
Dave Syer
deef784403 Blitz some more special characters from the metric names
When MVC path matchers are used as metric keys, they can still contain
invalid characters and patterns (like asterisks). This change removes
some more special characters and also tidies up the names a bit so
no key part starts or ends with "-" (which is ugly).

Fixes gh-1528
2014-09-13 10:59:20 -05:00
Dave Syer
437fb75424 Add /error to ignored paths for security autoconfig
Protecting /error doesn't make a great deal of sense and if it is
protected you don't get the ErrorPageFilter for the attempt at loading
it, so Tomcat renders its own HTML error page (when deployed as WAR).

Fixes gh-1548
2014-09-13 10:55:39 -05:00
Dave Syer
bf0c8fc8bb Remove JDBC from secure-web sample
Fixes gh-1534
2014-09-13 06:42:59 -05:00
Dave Syer
9902f98a3d Ensure the AuthenticationManager is created when needed
There was too much state really in the old implementation of
AuthenticationManagerConfiguration, and it was leading occasionally
to null pointers when method A assumed that method B had already
been called and it hadn't. This change manages to concentrate all the
references to an AuthenticationManagerBuilder into a single method
call, removoing the need for storing it at all.

Fixes gh-1556
2014-09-13 06:42:46 -05:00
Dave Syer
0950072b5e Fix integration test (shared context by accident) 2014-09-12 16:03:22 -05:00
Andy Wilkinson
06ffd9dd86 Fix configuration of Spring Loaded on Gradle 1.6
The applicationDefaultJvmArgs property was added in Gradle 1.7. This
commit updates RunPluginFeatures to access the property defensively
so that the plugin can be used with Gradle 1.6.

Fixes gh-1511
2014-09-07 18:23:16 -05:00
Andy Wilkinson
750c116078 Upgrade to Spring Integration 4.0.4 and Spring AMQP 1.3.6
Closes gh-1503
Closes gh-1505
2014-09-07 17:32:09 -05:00
John Tims
a4e08beebc Add missing variable to the example in the Loading YAML section
Closes gh-1524
2014-09-07 15:43:22 -05:00
Christoph Frick
3b07e4e633 Fix typos in the documentation: though -> through
Closes gh-1510
2014-09-07 11:03:49 -05:00
Dave Syer
9a2f9825d1 Fix asciidoc syntax 2014-09-05 16:33:32 +01:00
Dave Syer
993c7691ec Fix recommended authentication configuration to match samples 2014-09-05 16:30:54 +01:00
Phillip Webb
338288205b Fixup version numbers following release 2014-09-04 15:40:55 -07:00
Spring Buildmaster
d63e4b4329 Next development version 2014-09-04 12:15:18 -07:00
Phillip Webb
eaa3bd040d Apply eclipse formatting rules 2014-09-04 09:39:58 -07:00
Andy Wilkinson
990213b8b8 Correct reference to ConfigurableEmbeddedServletContainerFactory
Closes gh-1500
2014-09-04 17:04:38 +01:00
Dave Syer
73a5a8730b Fix versions in simple sample 2014-09-04 10:20:54 +01:00
Dave Syer
378f6b78ce Add ServiceLoader for AST transformations
The loading is via a marker interface SpringBootAstTransformation
to avoid clashing with other services registered as org.groovy.*

Fixes gh-1392
2014-09-04 10:13:09 +01:00
Stephane Nicoll
3f148683a1 Update to Spring framework 4.0.7
Fixes gh-1488
2014-09-04 11:10:33 +02:00
Dave Syer
8a66d50edf Remove binary files 2014-09-04 08:51:37 +01:00
Phillip Webb
7e6bad8d4b Fix @ActiveProfile to override existing profiles
Change SpringApplicationContextLoader to set active profiles using the
`spring.profiles.active` environment property rather than calling
`SpringApplication.setAdditionalProfiles`. This allows @ActiveProfiles
to replace existing profiles rather than add to them which is consistent
with the Spring TestContext Framework.

Fixes gh-1469
2014-09-03 15:01:52 -07:00
Phillip Webb
c2ff7ca80f Add HtppClientOptions to TestRestTemplate
Allow customization of the Apache HTTP Client used in TestRestTemplate
via an options enum.

Fixes gh-1497
2014-09-03 14:15:47 -07:00
Phillip Webb
bedb44adc8 Ensure non-remapped calls are still logged
Update LevelRemappingAppender to that any calls that aren't remapped
are still logged.

Fixes gh-1481
2014-09-03 11:45:09 -07:00
Stephane Nicoll
f46fe32264 Add group discriminant in case of conflict
Prior to this commit, the repackage goal silently ignored the case of
two libraries having the same name and version but a different group.
As a result, the second library was overwriting the first one in the
repackaged jar.

This commit adds support for custom Library names and updates the
Maven and Gradle plugins so that the name includes the group ID
when there would otherwise be a duplicate.

Fixes gh-1475
2014-09-03 11:22:53 -07:00
Phillip Webb
449752c9e2 Minor asciidoctor formatting 2014-09-03 08:38:31 -07:00
Stephane Nicoll
811f5ab80c Clarify the use of spring.profiles
Fixes gh-1470
2014-09-03 16:30:55 +02:00
Stephane Nicoll
9a8d05bd43 Clarify addResources parameter description
This commit clarifies the role of the 'addResources' flag and makes
it explicit that any duplicate found in the target directory are
actually removed

Fixes gh-1479
2014-09-02 15:54:40 +02:00
Stephane Nicoll
f48628fa90 Workaround fix for git-commit-plugin
This commit is a workaround until git-commit-id-plugin 2.1.11 is
released. See also issue 124 of that project

Fixes gh-1484
2014-09-02 15:44:24 +02:00
Phillip Webb
34cbcf5e50 Support better HttpMessageConverters manipulation
Add additional constructor and a protected postProcessConverters method
to make it easier to manipulate the final converter list that will
be used.

Fixes gh-1482
2014-09-01 17:18:51 -07:00
Phillip Webb
0c0a0a7738 Convert session timeout to minutes for Tomcat
Convert any session timeout values from seconds to minutes when
configuring Tomcat.

Fixes gh-1422
2014-08-28 14:24:55 -07:00
Phillip Webb
a07f0272f9 Polish 2014-08-28 11:15:14 -07:00
Mattias Severson
04c3e9979f Fix typo
Fixes gh-1463
2014-08-28 11:13:33 -07:00
Phillip Webb
a5484e47cd Extract getServletContextInitializerBeans logic
Extract the hairy logic from getServletContextInitializerBeans() to a
new class and refactor things a little.
2014-08-28 10:06:47 -07:00
Dave Syer
c2444aecd6 Continue with default location if CONFIG_LOGGING fails
Tomcat in particular sets an environment variable in it's shell scripts
that people commonly use to start the container. So if people deploy a war
file to a stock Tomcat server they can't override the logging config, even
with the default location. With this change at least that should work
(for logback and log4j anyway). Tested with logback.

See gh-1432
2014-08-28 07:50:46 +01:00
Dave Syer
47b59046bd Order Filters, Servlets etc. separately in EmbeddedWebApplicationContext
Users could be surpised if they register a Filter with an @Order and it
isn't apparently respected. This change accumulates all Filters and
FilterRegistrations (for instance) before sorting them.

Fixes gh-1455
2014-08-27 16:29:59 +01:00
Dave Syer
1ddcf3657b Be defensive about resolving properties in PropertySourcesPropertyValues 2014-08-27 16:04:21 +01:00
Andy Wilkinson
37aa532617 Upgrade to Spring Data Dijkstra SR4
Closes #1419
2014-08-27 13:34:03 +01:00
Andy Wilkinson
adc8cdf16a Fix generics warnings triggered by upgrade to Tomcat 7.0.55
See changes made in revision 1602507 [1]

[1] https://svn.apache.org/viewvc?view=revision&revision=1602507
2014-08-27 12:22:13 +01:00
Andy Wilkinson
d0a85dd477 Add Elasticsearch starter to table of starters in the documentation
Fixes #1446
2014-08-27 10:06:45 +01:00
Phillip Webb
1381fe172e Polish 2014-08-26 09:40:33 -07:00
Andy Wilkinson
28f7cf4487 Convert URL to File using a URI so that URL-encoding is removed
Fixes #1429
2014-08-26 17:04:50 +01:00
Dave Syer
95d65c2ff5 Add indirection to avoid runtime dependency on MVC in templates
Velocity and Freemarker share some common properties so the base class for
configuring their properties makes some sense. Unfortunately the implementation
pulls in Spring MVC at runtime because of the signature of one method (that
would never be called). We can fix that in a number of ways, but the least
disruptive is probably to change the signature of that method and only refer
to the concrete template view resolver type if the method is called.

Fixes gh-1437
2014-08-26 09:19:07 +01:00
Phillip Webb
f4dc090bae Add a little more context to ErrorPageFilter log
Add the servlet and context path along with the exception message to
the error logged in ErrorPageFilter.

See gh-1427
2014-08-25 10:06:22 -07:00
Dave Syer
2d67452128 Log exceptions in ErrorPageFilter
For some reason I thought that the DispatcherServlet default handler
would log all exceptions, so if we did it in the ErrorPageFilter it
would lead to duplicates. That appears not to be the case.

Fixes gh-1427
2014-08-25 17:26:57 +01:00