Commit Graph

6484 Commits (a4baacc5493fa7259af75c62236fb6a26b3589ca)
 

Author SHA1 Message Date
Johnny Lim a4baacc549 Remove a redundant setUseSuffixPatternMatch(false)
Closes gh-4656
9 years ago
Andy Wilkinson 4260b0c765 Remove ignoreUnknownFields accidentally added in 524a328 9 years ago
Gary Russell 6c1c7133e7 Upgrade to Spring Integration 4.2.2.RELEASE
Closes gh-4511
9 years ago
Andy Wilkinson 524a32879f Allow security filter's dispatcher types to be configured via env
This commit adds a new property, security.filter-dispatcher-types
that can be used to configure the dispatcher types of Spring
Security's filter chain. The default remains unchanged.

Closes gh-4505
9 years ago
Andy Wilkinson 8e0d3ed0eb Don’t return 404 when metric or env regex matches entry with null value
Previously, if a regular expression was used when calling the metrics or
environment endpoints, a metric or property with a null value would
result in a 404 response.

This commit updates the two affected endpoints so that any metric or
property whose name matches the regular expression but has a null value
is ignored. This allows all of the matching metrics or properties with
non-null values to be returned in a 200 OK response.

Closes gh-4552
9 years ago
Andy Wilkinson f25a5e3b77 Improve documentation of color-coded console output
This commit documents the color converter, the explicit colors and
styles that is supports, and the implicit colors used for each log
level.

 Closes gh-4592
9 years ago
Andy Wilkinson 8618ec89b1 Ensure that environment post processors are ordered correctly
Previously, ConfigFileApplicationListener would always add itself to the
end of the list of environment post processors loaded via
spring.factories. This meant that its order (highest precedence + 10)
would not be honoured and it would only be in the right place in the
list if any other post processors happened to have a higher precedence.

This commit updates ConfigFileApplicationListener to sort the list of
post processors using AnnotationAwareOrderComparator once its added
itself to the list.

Closes gh-4595
9 years ago
Andy Wilkinson 008f2a8874 Merge branch '1.2.x' 9 years ago
Andy Wilkinson 0214fe4b82 Remove inconsistent synchronization from EmbeddedWebApplicationContext
Previously, EmbeddedWebApplicationContext used synchronized, but did
not do so consistently. It also synchronized on this so its lock was
exposed outside of the class, creating a risk of deadlock if a caller
synchronized incorrectly. Furthermore, not all fields on the class
were sychronized so the class wasn't truly thread-safe.

This commit attempts to rectify some of the problems above. The use
of synchronized has been dropped in favour of using a volatile field
for the embedded servlet container. Whenever this field is accessed,
a local variable is used to "cache" the value thereby preventing a
change on another thread from causing unwanted behaviour such as an
NPE.

Closes gh-4593
9 years ago
Andy Wilkinson 0f032eeb8a Address warnings reported by shellcheck for changes made in 7011944
Closes gh-4524
9 years ago
Andy Wilkinson 70119449ce Add workaround for race condition in start-stop-daemon
There’s a race condition in start-stop-daemon when --make-pidfile and
--background are used together [1]. This race condition can lead to the
command returning before the PID file has been created. The missing PID
file then causes the launch script to incorrectly report that the
service failed to start.

This commit updates the launch script to wait for up to 10 seconds for
the PID file to be created when start-stop-daemon is used to launch the
app.

Closes gh-4524

[1] https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/1036899
9 years ago
Stephane Nicoll fc5e3d6441 Refine exception message
Closes gh-4569
9 years ago
Andy Wilkinson 40427cdb82 Separate Jersey WebApplicationInitializer from auto-configuration class
Previously, JerseyAutoConfiguration was a WebApplicationInitializer.
This was problematic as auto-configuration classes should not be ordered
(they should use AutoConfigureBefore etc instead) but the web
application initializer needs to be ordered so that it can run early and
configure Jersey before it runs.

This commit has moved the WebApplicationInitializer implementation into
a separate class so that it can be ordered independently of the
auto-configuration class. Note that the new class must be public for
the servlet container (Tomcat at least) to be able to instantiate it.

Closes gh-4527
9 years ago
Dave Syer 6ec767437a Fix server.error.path reference in error controller 9 years ago
Stephane Nicoll 1ec40ed666 Polish 9 years ago
Stephane Nicoll 5cdd874d55 Document `@AutoconfigureOrder`
Closes gh-4546
9 years ago
Stephane Nicoll e78ddc903e Polish 9 years ago
Stephane Nicoll f2a32148ff Merge pull request #4626 from jadekler/liquibase_upgrade
* pr/4626:
  Upgrade liquibase to 3.4.2
9 years ago
Jean de Klerk b00bccb7ca Upgrade liquibase to 3.4.2
Remove 3.4.1 logger workaround (adding package to default service). See
CORE-2436 on the liquibase tracker for more details.

Closes gh-4591
Closes gh-4625
9 years ago
Stephane Nicoll 7d6f63ae34 Add redirection to actuator endpoint
If a request to the actuator endpoint ends with a slash with Spring
HATEOAS on the classpath, an empty array of links is returned whereas
a request without the slash returns a response with all the expected
links to the actuator's other endpoints.

This commit adds an automatic redirection so that both URIs return the
expected result.

Closes gh-4575
9 years ago
Stephane Nicoll 5beeaf1760 Merge pull request #4582 from tsachev/gh-4557
* pr/4582:
  Use fast exceptions in findResource(s)
9 years ago
Vladimir Tsanev 1e2f133892 Use fast exceptions in findResource(s)
Some libraries like aspectj are using findResource to see the raw
bytecode of a class. It will even call findResource for every method of
every class of beans that are post processed. This can be significant
performance hit on startup when LaunchedURLClassLoader and there are a
lot of nested jars.

See gh-3640
Fixes gh-4557
9 years ago
Stephane Nicoll 1adca44eaa Merge branch '1.2.x' 9 years ago
Stephane Nicoll 9bffdc80ff Upgrade to Spring Framework 4.1.9.BUILD-SNAPSHOT 9 years ago
Dave Syer 521ae35f56 Do not set order of ResourceServerConfiguration instances
The need to set the order of ResourceServerConfiguration was
a bad assumption. The value of the order seems strange as well
(-10), and a comment explaining it makes no sense (a resource
server normally wants its filter *after* not *before* the existing
auth server filter). Removing the bean post processor didn't
fail any tests.

In case there are multiple resource servers in the same context
there was also a problem that they ended up with the same order.
9 years ago
Stephane Nicoll afd38c7a35 Merge pull request #4635 from kazuki43zoo/fix-typo-on-doc
* pr/4635:
  Fix typo in reference doc
9 years ago
Kazuki Shimizu b5bb184766 Fix typo in reference doc
Closes gh-4635
9 years ago
Dave Syer 344360453e Add test for management.security.enabled=false with child context 9 years ago
Dave Syer 2de48a35ab Make /error the error page in child context as well as parent
If user set the management.port *and* the management.context-path
then the /error path was in the wrong place because formerly it
was implemented (in this case) by an MvcEndpoint. If we
switch it to a regular @Controller (which are now supported in the
child context if there is one) then it won't disappear under the
management.context-path.

Also use lazy request matching in ignores as well as secure paths.
The problem was that the ignores were constructed eagerly from the
actuator paths before they were available (the EndpointHandlerMapping
needs to be lazily accessed to avoid a security-induced bean creation
cascade).

Fixes gh-4624
9 years ago
Stephane Nicoll 754642e0cf Document HealthIndicator naming convention
Closes gh-4602
9 years ago
Stephane Nicoll 9d29ab73a4 Fix customization of database name
Previously, the `spring.datasource.name` property was ignored when Spring
Boot configures an embedded data source with a connection pool.

`EmbeddedDatabaseConnection` is now aligned to the purely embedded case
to take that property into account.

Closes gh-4586
9 years ago
Stephane Nicoll e6588dbf70 Make LOGGING_SYSTEM_BEAN_NAME public
Since the `LoggingSystem` may be retrieved very early during the context
initialization, we should do a lookup by name even if only one instance
of that bean is ultimately expected in the context.

The constant defining the bean name is now public to ease that use case.

Closes gh-4584
9 years ago
Stephane Nicoll 5284cbd084 Merge branch '1.2.x' 9 years ago
Stephane Nicoll 1ab05326a9 Upgrade to Spring Social 1.1.4.RELEASE 9 years ago
Stephane Nicoll d883f647ba Add test coverage for WebApplicationContextUtils
See gh-4370
9 years ago
Stephane Nicoll 43b8e65eee Add dedicated section for `spring.main.banner-mode`
One of the options of the new `banner-mode` property is `off`. YAML maps
`off` to `false` and since we are exposing the method from the
`SpringApplication` public class we can't change the signature to accept
a `String` and do the conversion ourselves.

This commit adds a dedicated section in the guide to warn users about
that particular situation. Adding quotes around the value prevents the
conversion.

Closes gh-4600
9 years ago
Dave Syer 4488bac4c3 Remove server.context-path from actuator endpoints if port set
If the user sets the management.port, he wants some of the
server.* properties, but not the context-path. This change
restores the behaviour in 1.2.x.

Fixes gh-4401
9 years ago
Dave Syer dd7d587ea8 Add tests to assert behaviour of actuator endpoints with context path
See gh-4401
9 years ago
Dave Syer 7d04ca1e1b Add tests to assert behaviour of actuator endpoints with context path
See gh-4401
9 years ago
Stephane Nicoll 77190f126a Create dedicated section for property conversion
See gh-4604
9 years ago
Dave Syer cccc3867eb Allow users to customize authentication entry point in OAuth2 SSO
The SsoSecurityConfigurer that gets added when a user has a custom
WebSecurityConfigurer with @EnableOAuth2Sso is quite opinionated, and
this is preventing users from custimizing the exception handling in the
customized UI security. This change makes it less opinionated, using
request matchers to configure the default instead of ovewriting the
single authentication entry point.

Also adds an entry point responding with a 401 for XHR clients (just like
the vanilla HTTP Basic auth).

Fixes gh-4629
9 years ago
Stephane Nicoll e19d9ff09d Fix gradle config for the bootRun task
Closes gh-4627
9 years ago
Stephane Nicoll 141907c65f Merge branch '1.2.x'
# Conflicts:
#	spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/ConfigurationMetadataAnnotationProcessor.java
#	spring-boot-tools/spring-boot-configuration-processor/src/test/java/org/springframework/boot/configurationprocessor/ConfigurationMetadataAnnotationProcessorTests.java
9 years ago
Stephane Nicoll ae13082e0d Generate meta-data for nested Lombok types
Closes gh-4397
9 years ago
Stephane Nicoll 89aba8b3d8 Merge branch '1.2.x' 9 years ago
Stephane Nicoll 8ede966708 Harmonize java.mail dependency management
Closes gh-4588
9 years ago
Stephane Nicoll 9c412232d5 Improve log message with active profiles
Closes gh-4612
9 years ago
Stephane Nicoll 1ff070f6e9 Fix broken build 9 years ago
Stephane Nicoll 091478e0fd Disable ehcache statistics if necessary
`EhCacheStatisticsProvider` uses the `StatisticsGateway` API introduced
in ehcache 2.7 (march 2013). If an older ehcache version is present, we
should back-off as this class is not available.

Closes gh-4621
9 years ago
Dave Syer d6a424f94c Add support for UTF-8 in application.properties
Fixes gh-4622
9 years ago