Commit Graph

3064 Commits (1ed90df6301bb5474439b82751dea4ac691a4ad2)
 

Author SHA1 Message Date
Phillip Webb 1ed90df630 Merge branch '1.1.x' 10 years ago
Phillip Webb bff39e954e Add `server.tomcat.port-header` support
Update Tomcat ServerProperties to support the RemoteIpValve portHeader
property.

Fixes gh-1616
10 years ago
Phillip Webb 0dc46a2fe7 Drop protocolHeader and remoteIpHeader defaults
The `protocolHeader` and `remoteIpHeader` no longer have default values
and must be opt-in.

Fixes gh-1624
10 years ago
Andy Wilkinson 0c63406b49 Merge branch '1.1.x' 10 years ago
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
10 years ago
Phillip Webb abed1f4d4c Restore ThymeleafAutoConfiguration test
Restore the test removed during the merge.
10 years ago
Phillip Webb 38585ec4eb Merge branch '1.1.x' 10 years ago
Phillip Webb 258059ea08 Fix failing ThymeleafAutoConfigurationTests
Remove accidental addition of a 1.2 test.
10 years ago
Dave Syer 9d9819c338 Merge branch '1.1.x' 10 years ago
Dave Syer c1404b1e41 Tidy some Javadocs 10 years ago
Phillip Webb 0d0e5eb590 Merge branch '1.1.x' 10 years ago
Dave Syer 336b96b81c Copy server customization to management context
If the actuator endpoints are configured on a different port then there
are some settings in the main ServerProperties that we would like to
re-use (e.g. the access log). The easiest way to do that is to just
configure the management server using the same ServerProperties instance
and then overwrite the things that are different (and stored in
ManagementServerProperties).

Fixes gh-1581
10 years ago
Dave Syer 304920df07 Make Thymeleaf @ConditionalOnWebApplication
If user creates a Thymeleaf app with a parent-child context then the
child should contain all the web-specific pieces (and they are likely
to fail fast if they need to be ServletContextAware, or slower if they
try to locate a WebApplicationContext at runtime). This can't happen
if the view resolver is being added to the parent.

Freemarker and Velocity already have similar tests because it is assumed
that they should be usable outside a web app, so this change just does the
same for Thymeleaf.

Fixes gh-1611
10 years ago
Stéphane DERACO 68ff7d4592 Fix broken documentation links
Fix links to `actuator-noweb`, `actuator-log4j` and `hornetq` samples.

Fixes gh-1613
10 years ago
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
10 years ago
Phillip Webb 55a84c7bd7 Merge branch '1.1.x' 10 years ago
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
10 years ago
Phillip Webb 142216400a Polish formatting 10 years ago
Andy Wilkinson b4c94f427a Merge branch '1.1.x' 10 years ago
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
10 years ago
Andy Wilkinson 5d1a114aa6 Merge branch '1.1.x'
Redundant @ConditionalOnMissingBean annotation has been removed.
ActiveMQConnectionFactoryConfiguration is not auto-configuration and
is imported by ActiveMQAutoConfiguration which is protected by
@ConditionalOnMissingBean(ConnectionFactory.class)
10 years ago
Andy Wilkinson cf22e28ddc Add tests to verify that ActiveMQAutoConfiguration backs off
See gh-1599
10 years ago
Andy Wilkinson 42821990f4 Merge branch '1.1.x' 10 years ago
Tomas Lin 38d8a5cda0 Fix typo in comment
Closes gh-1596
10 years ago
Dave Syer 97dcd24668 Merge branch '1.1.x' 10 years ago
Dave Syer a63d0b4e16 Update docs with DispatcherType.ERROR for filters
Some frameworks handle all requests in a Filter, so you have to
explicitly register it as an ERROR dispatcher.

See gh-1272
10 years ago
Andy Wilkinson 944045cd34 Merge branch '1.1.x' 10 years ago
Marius Bogoevici 5c84e17d10 Activate WebSecurityEnabler only for web applications
Done in order to align with the rest of the configuration. Absent this
check, the bean will be installed in non-web applications without the
corresponding dependencies, causing the bootstrap to fail.

Closes gh-1588
10 years ago
Andy Wilkinson c2e588a37c Merge branch '1.1.x' 10 years ago
N Jain a8af254765 Fix description of test file to be tests.groovy
Corrected the documentation to refer to file as tests.groovy, rather
than test.groovy. Updated cope snippet as tests.groovy should expect
"Hello World!" rather than "Hello World".

Closes gh-1593
10 years ago
Phillip Webb 0468cf5a8f Merge branch '1.1.x' 10 years ago
Phillip Webb 468db03aef Formatting 10 years ago
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
10 years ago
Dave Syer b06d10ddb0 Merge branch '1.1.x' 10 years ago
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)
10 years ago
Andy Wilkinson 2dbe4d706b Merge branch '1.1.x' 10 years ago
Andy Wilkinson 6248fc0d60 Fix logic for identifying test classes on Windows
Use File.separator rather than hard-coding the use of ‘/‘

Closes gh-1571
10 years ago
Phillip Webb 3c5b007ff9 Add @Order annotations to conditions
Fixes gh-1574
10 years ago
Phillip Webb 22378698fe Upgrade to Spring Framework 4.1.1.BUILD-SNAPSHOT 10 years ago
Phillip Webb 51b8b1e590 Merge branch '1.1.x' 10 years ago
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
10 years ago
Andy Wilkinson 3c93d9a803 Merge branch '1.1.x' 10 years ago
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
10 years ago
Stephane Nicoll aeeade2ed5 Merge missed documentation update
Cherry pick documentation updates which appear to have been
lost during a previous merge.

Fixes gh-1523
Cheery-picked from 16c2477d
10 years ago
Phillip Webb 88f8eb7fa4 Merge branch '1.1.x' 10 years ago
Phillip Webb 611f978181 Make all @Bean methods public
Fixes gh-1571
10 years ago
Phillip Webb d441e7af93 Fix merge error 10 years ago
Phillip Webb 52853085a9 Merge branch '1.1.x' 10 years ago
Phillip Webb 9e9e450211 Fix @Since tag 10 years ago
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
10 years ago