Commit Graph

5189 Commits

Author SHA1 Message Date
Dave Syer 924b9f9dde Add Maven incantation to make STS 3.7 happy 2015-07-10 15:56:40 +01:00
Dave Syer b2a2c5b168 Add Maven incantation to make STS 3.7 happy 2015-07-10 15:56:40 +01:00
Stephane Nicoll 1348acf3e3 Exclude freemarker from hazelcast
Hazelcast introduced a regression in their dependency management as of
3.5 which brings freemarker. This has unfortunate side effect in a Spring
Boot application since the freemarker auto-configuration kicks in for no
apparent reason when hazelcast is used.

An exclusion has been applied until the issue is fixed in hazelcast.

Closes gh-3418
2015-07-10 16:37:50 +02:00
Stephane Nicoll 8ff8afec7c Add "handle-as" hint provider
Replace the enum provider by a more general purpose provider that can
substitute the type of the property for the purpose of auto-completing
the values.

"handle-as" can be used for enums but for any type that the IDE
understands such as locale, charset, mime-type and Spring's resource
abstraction.

Closes gh-3457
2015-07-10 14:28:11 +02:00
Stephane Nicoll f6f74e1aef Polish 2015-07-10 10:48:47 +02:00
Spring Buildmaster 57f26c6bfc Next development version 2015-07-09 17:30:48 -07:00
Phillip Webb 8280004f80 Fix ClasspathLoggingApplicationListener order
Commit 3de25164 inadvertently caused early debug logging from the
ClasspathLoggingApplicationListener. We now set its order relative
to the LoggingApplicationListener.

See gh-2543
2015-07-09 16:51:19 -07:00
Phillip Webb eeb947b382 Polish docs 2015-07-09 12:56:03 -07:00
Phillip Webb e3b59774c8 Merge branch '1.2.x' 2015-07-09 10:37:30 -07:00
Phillip Webb 4b17f3ceef Formatting 2015-07-09 10:37:21 -07:00
Phillip Webb 67f7079cb2 Formatting 2015-07-09 10:18:05 -07:00
Stephane Nicoll e344eece99 Remove hint for server.tomcat.compression
server.tomcat.compression has been removed in 00d594d so the hint for it
is no longer relevant.
2015-07-09 17:50:26 +02:00
Andy Wilkinson a2d58030dd Merge branch '1.2.x' 2015-07-09 16:42:37 +01:00
Andy Wilkinson 68e54e1d5d Favour entries in source jar over standard libraries when repackaging
When writing a jar, once an entry has been written it will never be
overwritten, i.e. the first write of a given entry will win. Previously,
when repackaging a jar, the existing contents were written followed by
any libraries. This caused a problem when repackaged a WAR file and
a library needed to be unpacked as the existing entry in WEB-INF/lib
would prevent the library with the UNPACK comment from being written.
This was addressed in f761916b by inverting the order so libraries
would take precedence over entries in the source jar.

It’s now become apparent that this change in the order causes a problem
for users who are obfuscating their code. The obfuscated code exists in
the source jar but is also provided to the repackager in its original
form as a library. When libraries take precedence, this means that the
code in its original form ends up in the repackaged war and the
obfuscation is lost.

This commit updates the repackager to write libraries that require
unpacking first. This allows the UNPACK comment to be written even if
there’s also a source entry for the library. Next, source entries are
written. This allows obfuscated source entries to take precedence over
any unobfuscated library equivalents. Lastly, standard libraries that
do not require unpacking are written into the repackaged archive.

Closes gh-3444
2015-07-09 16:37:10 +01:00
Stephane Nicoll cf1c0cd04c Polish 2015-07-09 14:57:45 +02:00
Stephane Nicoll c5ae68a1ec Clarify enum provider purpose 2015-07-09 14:38:48 +02:00
Stephane Nicoll 97634e85ac Remove unnecessary keyword 2015-07-09 14:33:01 +02:00
Stephane Nicoll f34508ff8a Remove outdated key
The `spring.metrics.export.redis.aggregate-key-pattern` is no longer
defined but was still referenced in the documentation.
2015-07-09 10:46:05 +02:00
Stephane Nicoll f77b0e4b6a Force documentation of nested group
The `strategy` group is not detected in the meta-data because the
Strategy inner class is not defined at the "right" level in the
hierarchy.

For now, `@NestedConfigurationProperty` was added to workaround the
issue. Once gh-3454 is solved, we should remove them.
2015-07-09 10:42:44 +02:00
Stephane Nicoll 4dda1814e2 Prevent bean early initialization
Fix `CacheManagerValidatorPostProcessor` that could lead to early bean
initialization.

Fixes gh-3440
2015-07-09 10:10:30 +02:00
Stephane Nicoll 8cb6f7bcb8 Polish
See  gh-3372
2015-07-09 09:43:20 +02:00
Stephane Nicoll 5024c0f8a1 Polish
Add documentation for server.session.cookie keys

See gh-3240
2015-07-09 09:21:33 +02:00
Phillip Webb 2a20994833 Document static-resources configuration property
Add `spring.resources.static-locations` to the reference documentation
appendix.

Fixes gh-3372
2015-07-08 23:39:11 -07:00
Phillip Webb 582239b03b Add ApplicationArguments and ApplicationRunner
Add ApplicationArguments interface which allows SpringApplication.run
arguments to be injected into any bean. The interface provides access
to both the raw String[] arguments and also provides some convenience
methods to access the parsed 'option' and 'non-option' arguments.

A new ApplicationRunner interface has also been added which is
similar to the existing CommandLineRunner.

Fixes gh-1990
2015-07-08 23:27:13 -07:00
Phillip Webb 3de2516452 Tweak LoggingApplicationListener order
Provide additional space between the ConfigFileApplicationListener order
and the LoggingApplicationListener order.

Fixes gh-2543
2015-07-08 14:38:20 -07:00
Phillip Webb 3588ca8637 Add session configuration properties
Add support for the following server properties which can be used to
configure the session:

	server.session.tracking-modes
	server.session.cookie.name
	server.session.cookie.domain
	server.session.cookie.path
	server.session.cookie.comment
	server.session.cookie.http-only
	server.session.cookie.secure
	server.session.cookie.max-age

In addition `server.session-timeout` is now deprecated and has been
replaced with `server.session.timeout`.

Fixes gh-3240
2015-07-08 14:10:06 -07:00
Phillip Webb 5938c967a3 Polish 2015-07-08 14:10:05 -07:00
Andy Wilkinson 9cb2a09680 Reinstate output of stack trace accidentally removed in 66d4a2a 2015-07-08 22:04:11 +01:00
Andy Wilkinson 66d4a2a49e Ignore Azure’s default LOGGING_CONFIG env var when initialising logging
When using Tomcat, Azure automatically configures an environment
variable called LOGGING_CONFIG that configures the
java.util.logging.config.file system property.
LoggingApplicationListener finds this configuration via the Spring
environment (it looks for logging.config) and attempts to use it as the
name of the logging configuration file. Since c3d93f7 this failure
causes the app to fail to start, rather than the previous behaviour of
silently falling back to the default configuration.

This commit updates LoggingApplicationListener to only consider
configuration that is a non-empty string and that does not start with
-Djava.util.logging.config.file=, which is the beginning of the default
configuration on Azure, and is very unlikely to be part of the name of a
logging configuration file.

Closes gh-3366
2015-07-08 21:58:54 +01:00
Andy Wilkinson 8225a8a7d5 Upgrade to Reactor and Reactor Spring 2.0.4.RELEASE
Closes gh-3264
2015-07-08 21:23:18 +01:00
Stephane Nicoll a073a505ae Move spring.oauth2.* to security.oauth2.*
Unfortunately, we have no other choice to flip the ignoreUnknownFields
attribute of `SecurityProperties` has many different target are now set
for that namespace outside the class. See gh-3445 for a potential way
to improve that.

Closes gh-3327
2015-07-08 18:26:25 +02:00
Dave Syer 7ceb7ce6f6 Add send count to Integration metrics
Fixed gh-3364
2015-07-08 16:13:17 +01:00
Dave Syer 94e41b4190 Fix assertion in broken test 2015-07-08 16:03:25 +01:00
Dave Syer 7410eee34f Add custom condition for /logfile endpoint
Fixes gh-3360
2015-07-08 15:59:05 +01:00
Dave Syer c71196b92d Better segregation of export and redis keys 2015-07-08 15:52:50 +01:00
Stephane Nicoll 54619bec3f Clarify javadoc
This might just be me but when I read the original javadoc it made me
think that caching worked only if the endpoint is accessed anonymously.
2015-07-08 15:05:50 +02:00
Phillip Webb ef39634e30 Polish 2015-07-07 23:59:35 -07:00
Phillip Webb 7dcb79b3b3 Support more lenient DB2 product lookups
Update DataSourceHealthIndicator to support pattern based matching for
DB2 products. Prior to this commit product identifiers of the form
`DB2/LINUXX8664` were not supported.

Fixes gh-3377
2015-07-07 23:18:21 -07:00
Phillip Webb 85535f0882 Disable DB migrations in ApplicationHierarchyTests 2015-07-07 22:17:10 -07:00
Phillip Webb 52643529a3 Merge pull request #3435 from eddumelendez/gh-3434
* pr/3435:
  Add flyway and liquibase endpoint documentation
  Add 'flyway' and 'liquibase' actuator endpoints
  Add serialization endpoint tests
2015-07-07 19:05:37 -07:00
Phillip Webb a087dbc9c3 Add flyway and liquibase endpoint documentation
See gh-3434
2015-07-07 18:58:25 -07:00
Eddú Meléndez 3995c16ba6 Add 'flyway' and 'liquibase' actuator endpoints
Add `/flyway` and `/liquibase` actuator endpoints to provide details of
any database migrations that have been applied.

Fixes gh-3434
Closes gh-3435
2015-07-07 18:58:18 -07:00
Phillip Webb 7e58483ead Add serialization endpoint tests
Test basic serialization in Endpoint tests to ensure that JSON
can always be produced.
2015-07-07 18:31:43 -07:00
Phillip Webb 223a6bd062 Merge branch '1.2.x' 2015-07-07 18:21:25 -07:00
Phillip Webb 7da808918f Fix Flyway and Liquibase JPA 'depends-on' setup
Ensure that FlywayAutoConfiguration and LiquibaseAutoConfiguration occur
after HibernateJpaAutoConfiguration so that the DependsOnPostProcessor
condition can correctly check for a LocalContainerEntityManagerFactory
bean.

Fixes gh-3437
2015-07-07 18:19:13 -07:00
Phillip Webb 7c84e4fe07 Revert "Use Spring Data Gosling snapshots"
This reverts commit 8f16ebd059.
2015-07-07 17:07:00 -07:00
Phillip Webb 9b78f5d52e Replace @ConditionalOnExpression conditions
Replace @ConditionalOnExpression usage in auto-configuration in favor
of faster direct Environment access.
2015-07-07 16:27:30 -07:00
Phillip Webb 71dbec381a Create @ManagementContextConfiguration annotation
Replace the previously used `EndpointWebMvcConfiguration`
`spring.factories` key with a dedicated ManagementContextConfiguration
annotation.

Also renamed the EndpointWebMvcHypermediaConfiguration and
EndpointWebMvcConfiguration classes to make it clearer that they are
for the management context.

See gh-3345
2015-07-07 15:17:11 -07:00
Phillip Webb b2fcd77d93 Rework EndpointWebMvcAutoConfiguration port logic
Update the `ManagementServerPort` detection logic to attempt direct
property resolution before looking for a local property bean
definition. Bean definitions provided by auto-configuration classes
are ignored.

This change allow `OnManagementMvcCondition` to use the
`ManagementServerPort` to determine when `EndpointWebMvcConfiguration`
should apply (removing the need to create a temporary context).

See gh-3345
2015-07-07 15:17:11 -07:00
Phillip Webb e885dab752 Polish 2015-07-07 15:17:03 -07:00