Commit Graph

2781 Commits (0ff511d978c273a8eae317ecf9f4f1b98e2efb07)
 

Author SHA1 Message Date
Dave Syer 0ff511d978 Catch Throwable instead of Exception in Spring Application
...so that application startup that fails because of an Error (for
instance NoClassDefFoundError) won't be swallowed.

Fixes gh-1645
10 years ago
Dave Syer 26a528ce95 Change config for git commit plugin in starter parent
Fixes gh-1489
10 years ago
Dave Syer 1b8f579da2 Clarify activation of RemoteIpValve
Fixes gh-1631
10 years ago
Dave Syer 034362b6e5 Explicit example for spring.jpa.properties.hibernate.*
Fixes gh-1636
10 years ago
Andy Wilkinson 45a168a47b Use correct version when linking to Spring and Spring Security docs
Closes gh-1621
10 years ago
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
10 years ago
Andy Wilkinson f7d1f968b9 Improve error message when JarFile encounters a compressed nested jar
Closes gh-1643
10 years ago
Dave Syer 79deed7ec5 Remove extra trailing '-' in metric name 10 years ago
Andy Wilkinson 8fcf355d71 Merge branch 'gh-1627' into 1.1.x 10 years ago
Andy Wilkinson 61e90f5b6e Add tests to Data REST sample for search operations
Closes gh-1627
10 years ago
bangsen.yin b798d001d7 Add missing @Param annotations to CityRepository in Data REST sample
Without the @Param annotations, using either of the search URIs would
resulted in a 400 response and an error describing the lack of @Param
annotation.

See gh-1627
10 years ago
Phillip Webb d0990c06a6 Fix typo in HttpMessageConverters auto-conf Tests 10 years ago
Phillip Webb 4f9258a345 Fixup version numbers following release 10 years ago
Spring Buildmaster edb4b7ed7d Next development version 10 years ago
Phillip Webb fa02c01727 Polish 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 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 258059ea08 Fix failing ThymeleafAutoConfigurationTests
Remove accidental addition of a 1.2 test.
10 years ago
Dave Syer c1404b1e41 Tidy some Javadocs 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 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 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 cf22e28ddc Add tests to verify that ActiveMQAutoConfiguration backs off
See gh-1599
10 years ago
Tomas Lin 38d8a5cda0 Fix typo in comment
Closes gh-1596
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
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
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 468db03aef Formatting 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 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 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 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
Phillip Webb 611f978181 Make all @Bean methods public
Fixes gh-1571
10 years ago
Phillip Webb 9e9e450211 Fix @Since tag 10 years ago
Phillip Webb 62a5ce52d0 Backport Jetty/Tomcat SSL support
Fixes gh-1570
Cherry-picked from 0960908 and 258c6f1
10 years ago
Phillip Webb fae9ab4140 Fix failing tests 10 years ago
Phillip Webb c0f69d28d3 Remove inadvertently committed debug System.out 10 years ago
Dave Syer 95c15733bc Use ErrorController.getErrorPath() to ignore the error path for security
Fixes gh-1548 again
10 years ago
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
10 years ago
Andy Wilkinson 468b6cb1f7 Add support for configuring RemoteIpValve’s internalProxies
Closes gh-1522
10 years ago
Phillip Webb 5ba86a103d Polish 10 years ago
Andy Wilkinson 2ba2cfe23d Document build-time property expansion using Gradle
Closes gh-1540
10 years ago
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
10 years ago
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
10 years ago
Dave Syer 7828f2a5d3 Update docs on metrics names 10 years ago