Commit Graph

601 Commits

Author SHA1 Message Date
Andy Wilkinson
31e6044e70 Merge branch '1.1.x' 2014-10-01 13:50:14 +01:00
Andy Wilkinson
e47435f1b1 Include code source location in message for competing LoggerFactory impl
To make it easier to identify the source of the competing LoggerFactory
implementation, this commit updates the exception message to include
the code source location of the offending class.

Closes gh-1630
2014-10-01 13:49:55 +01:00
John Tims
bebbe92fef Fix typo in javadoc 2014-09-28 09:52:48 -04:00
Maksim Kanev
6b5de38fef Add UTF-8 charset element to logback base.xml
Update base logback configuration to include a UTF-8 charset element
which helps with multilanguage support.

Fixes gh-1618
2014-09-26 11:46:45 -07:00
Spring Buildmaster
edb4b7ed7d Next development version 2014-09-25 21:02:37 -07:00
Andy Wilkinson
0c63406b49 Merge branch '1.1.x' 2014-09-25 19:06:37 +01:00
Andy Wilkinson
72ef1d6554 Update ErrorPageFilter so it won’t try to forward a committed response
In some scenarios, the ErrorPageFilter will want to forward the request
to an error page but the response has already been committed. One common
cause of this is when the filter’s running on WAS. WAS calls
flushBuffer() (which commits the response), upon a clean exit from a
servlet’s service method.

Previously, the filter would attempt the forward, even if the response
was committed. This would result in an IllegalStateException and a
possibly incomplete response that may also have an incorrect status
code.

This commit updates the ErrorPageFilter to check to see if the response
has already been committed before it attempts to forward the request to
the error page. If the response has already been committed, the filter
logs an error and allows the container’s normal handling to kick in.
This prevents an IllegalStateException from being thrown.

This commit also updates the response wrapper to keep track of when
sendError has been called. Now, when flushBuffer is called, if
sendError has been called, the wrapper calls sendError on the wrapped
response. This prevents the wrapper from suppressing an error when the
response is committed before the request handling returns to the error
page filter.

Closes gh-1575
2014-09-25 19:05:59 +01:00
Phillip Webb
0d0e5eb590 Merge branch '1.1.x' 2014-09-25 10:05:35 -07:00
Phillip Webb
0b50fe4eff Support String to char[] bindings
Update RelaxedConversionService to also support String to char[]
conversion. Primarily to support the `password` field in
MongoProperties.

Fixes gh-1572
2014-09-24 16:03:51 -07:00
Phillip Webb
55a84c7bd7 Merge branch '1.1.x' 2014-09-24 14:12:02 -07:00
Phillip Webb
23ff7c91d6 Add debug logging to ConfigFileApplicationListener
Update ConfigFileApplicationListener to include more debug level output.
Debug messages are recorded during onApplicationEnvironmentPreparedEvent
but not actually output until onApplicationPreparedEvent. This is
because the logging level might not have been correctly set until the
context is completely prepared.

Fixes gh-1584
2014-09-24 14:08:14 -07:00
Andy Wilkinson
b4c94f427a Merge branch '1.1.x' 2014-09-23 12:07:39 +01:00
Andy Wilkinson
c420249f7d Detect startup failures in additional Tomcat connectors
Previously, only the state of the primary connector was checked when
verifying that the embedded Tomcat instance has started successfully.
This commit updates the verification logic to examine all of the
service's connectors, thereby also detecting startup failures of any
additional connectors the have been configured.

A check on the primary connector's state has been removed from
initialize as, at this stage, its state will always be NEW.

Fixes gh-1591
2014-09-23 11:56:40 +01:00
Phillip Webb
0468cf5a8f Merge branch '1.1.x' 2014-09-19 22:42:53 -07:00
Phillip Webb
468db03aef Formatting 2014-09-19 22:41:10 -07:00
Phillip Webb
a3e0fa22a2 Add version properties for banner.txt usage
Extract banner.txt logic to ResourceBanner and include support for
`spring-boot.version` and `application.version` properties.

Fixes gh-1586
2014-09-19 22:38:35 -07:00
Dave Syer
b06d10ddb0 Merge branch '1.1.x' 2014-09-19 16:12:38 +01:00
Dave Syer
d6165d97dd A few tweaks that might improve performance on startup
... or couldn't hurt anyway.

1. Extends the definition of a web application for @ConditionalOnWebapp
so that a StandardEnvironment can be used (cutting out JNDI failures
for Environment properties)

2. Doesn't bother using StandardServletEnvironment in integration tests

3. Make the NON_ENUMERABLE_ENUMERABLES in PropertySourcesPropertyValues
static so they only get initialized once (not a huge issue at all)
2014-09-19 16:11:10 +01:00
Andy Wilkinson
2dbe4d706b Merge branch '1.1.x' 2014-09-18 16:45:19 +01:00
Andy Wilkinson
6248fc0d60 Fix logic for identifying test classes on Windows
Use File.separator rather than hard-coding the use of ‘/‘

Closes gh-1571
2014-09-18 16:45:07 +01:00
Phillip Webb
51b8b1e590 Merge branch '1.1.x' 2014-09-17 18:06:06 -07:00
Phillip Webb
bebcd60b7c Call LoggerContext.reset() during logback init
Update `LogbackLoggingSystem` to call the `reset()` method on the
`LoggerContext` before initialization.

This will hopefully reset the context to prevent the same appenders
from being accidentally added more than once.

Fixes gh-1091
2014-09-17 18:05:08 -07:00
Andy Wilkinson
3c93d9a803 Merge branch '1.1.x' 2014-09-17 19:41:14 +01:00
Andy Wilkinson
6dcaec2fef Make all @Bean methods public
This is a continuation of the changes made in 611f978. It makes some
more @Bean methods public and adds tests to spring-boot-actuator and
spring-boot-autoconfigure to prevent against non-public methods being
introduced in the future

Closes gh-1571
2014-09-17 19:39:39 +01:00
Phillip Webb
d441e7af93 Fix merge error 2014-09-17 10:20:08 -07:00
Phillip Webb
9e9e450211 Fix @Since tag 2014-09-17 10:12:48 -07:00
Phillip Webb
4f610fa5a1 Merge branch '1.1.x'
Conflicts:
	spring-boot-samples/spring-boot-sample-tomcat-ssl/pom.xml
	spring-boot-samples/spring-boot-sample-tomcat-ssl/src/test/java/sample/tomcat/SampleTomcatSslApplicationTests.java
	spring-boot/src/main/java/org/springframework/boot/context/embedded/ConfigurableEmbeddedServletContainer.java
	spring-boot/src/main/java/org/springframework/boot/context/embedded/Ssl.java
2014-09-17 10:11:30 -07:00
Phillip Webb
62a5ce52d0 Backport Jetty/Tomcat SSL support
Fixes gh-1570
Cherry-picked from 0960908 and 258c6f1
2014-09-17 10:08:05 -07:00
Phillip Webb
b129bc261a Polish 2014-09-15 13:08:56 -07:00
Phillip Webb
96dceb39a4 Tweak PoolingDataSourceBean.getParentLogger()
Update PoolingDataSourceBean.getParentLogger() to directly call the
method rather than use reflection. Also removed the logic from
`DirectXADataSource` since any fix there should really be applied in
the DataSource being wrapped (and not the wrapper).

See gh-1518
2014-09-15 11:58:53 -07:00
Andy Wilkinson
6f9f335ea1 Add additional class conditions for JTA auto-configuration
Previously, JTA auto-configuration would fail with a variety of
ClassNotFoundExceptions and NoClassDefFoundErrors if it was used with
an “incomplete” classpath. This commit adds a number of classes to
@ConditionalOnClass annotations so that the auto-configuration backs
off gracefully in the absence of certain classes.

Specifically, the following now work as expected:

 - Deploying an app to a server with JTA available via JNDI when the
   app does not use transactions
 - Auto-configuration of Atomikos without JMS
 - Auto-configuration of Bitronix without JMS

Both XADataSourceAutoConfiguration and JndiDataSourceAutoConfiguration
have been updated to back off in the absence of spring-jdbc; a
dependency of DataSourceProperties which is used by both classes.

Error handling in AtomikosDependsOnBeanFactoryPostProcessor and
BitronixDependentBeanFactoryPostProcessor has been enhanced so that the
correct dependencies are established, even in the absence of JMS.

Fixes gh-1538
2014-09-15 15:03:11 +01:00
Vladimir Tsanev
258c6f116a Add store type and store provider properties to SSL configuration
Closes gh-1545
2014-09-12 14:50:06 -05:00
Josh Long
14948c83f5 Add smarter getParentLogger that works on Java 6 and Java 7+
Fixes gh-1518
Closes gh-1519
2014-09-07 17:25:30 -05:00
Spring Buildmaster
d63e4b4329 Next development version 2014-09-04 12:15:18 -07:00
Phillip Webb
8bf1f9567a Apply eclipse formatting and cleanup rules 2014-09-04 09:49:13 -07:00
Phillip Webb
9cc893cd35 Merge branch '1.1.x'
Conflicts:
	spring-boot/src/test/java/org/springframework/boot/bind/RelaxedPropertyResolverTests.java
2014-09-04 09:41:58 -07:00
Phillip Webb
eaa3bd040d Apply eclipse formatting rules 2014-09-04 09:39:58 -07:00
Phillip Webb
6e0b5e48bd Merge branch '1.1.x' 2014-09-03 15:04:53 -07: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
114cd444ed Merge branch '1.1.x' 2014-09-03 14:16:18 -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
6f62fc854b Merge branch '1.1.x' 2014-09-03 11:45:54 -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
Phillip Webb
2186da453f Merge branch '1.1.x' 2014-08-28 14:27:09 -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
f8a4df0838 Polish 2014-08-28 12:07:44 -07:00
Phillip Webb
544bc64d64 Merge branch '1.1.x' 2014-08-28 11:31:50 -07:00
Phillip Webb
a07f0272f9 Polish 2014-08-28 11:15:14 -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
Stephane Nicoll
a0c316d392 Improve RepositoryRestConfiguration customization
This commit binds RepositoryRestConfiguration to the spring.data.rest
prefix so that any of its property can be customized through the
environment.

If a RepositoryRestMvcConfiguration is defined in the context, those
customization do not apply, as it was the case before.

Fixes gh-1171
2014-08-28 16:45:32 +02:00