Commit Graph

21208 Commits

Author SHA1 Message Date
arghya88
6e71af2d21 Fix copyright date
Closes gh-3632
2015-07-31 10:19:46 +02:00
Stephane Nicoll
d9648a36fe Add more specific test
Add an error controller test that translates a ResponseStatus annotated
exception that does not contain a reason attribute.

See gh-3623
2015-07-30 17:08:03 +02:00
Stephane Nicoll
4a327dc08b Add missing meta-data
Closes gh-3620
2015-07-30 10:39:51 +02:00
Stephane Nicoll
a90970060d Polish 2015-07-30 09:40:25 +02:00
Stephane Nicoll
e32efc179c Polish 2015-07-30 09:39:51 +02:00
Stephane Nicoll
bc0487f791 Polish
Make sure that the meta-data can be serialized.
2015-07-29 14:01:21 +02:00
Andy Wilkinson
255764f1a0 Ensure that custom Liquibase logger is always used
Liquibase 3.4.0 contains a bug that causes the initialization of its
ServiceLocator to pollute its map of loggers with a DefaultLogger for
the logger named "liquibase". Liquibase 3.4.1 contains a change that
improves the situation, but does not address is completely. Creating a
CustomResolverServiceLocator, as we do, still causes the map of
loggers to be polluted due to logging that's performed in
ClassLoaderResourceAccessor.getResourcesAsStream.

The commit address the problem by upgrading to Liquibase 3.4.1 and
adding the package containing our custom logger to the default service
locator before we register our custom service locator. This ensures
that the logging that's performed during the creation of our custom
service locator will still use our custom logger.

Closes gh-3470
Closes gh-3616
2015-07-29 10:15:29 +01:00
Stephane Nicoll
3298761437 Update maven prerequisite
Closes gh-3614
2015-07-29 09:21:25 +02:00
Stephane Nicoll
41bc3b386e Rename ManagementSecurityAutoConfiguration
Since `ManagementSecurityAutoConfiguration` is cnfiguring web-related
things, it has been renamed to `ManagementWebSecurityAutoConfiguration`.

Closes gh-2163
2015-07-28 15:20:59 +02:00
Stephane Nicoll
96fc107ca1 Customize Thymeleaf default template resolver order
Currently, the default TemplateResolver had no specific order. Thymeleaf
handles that with a "always first" strategy (that can be confusing if
several TemplateResolver have a "null" order.

While it is a fine default (and changing it could lead to weird side
effects), it has to be changed as soon as another TemplateResolver bean
is defined in the project.

The `spring.thymeleaf.template-resolver-order` property has been added to
control  the order of the default TemplateResolver.

Closes gh-3575
2015-07-28 14:28:31 +02:00
Stephane Nicoll
65c6492b6f Merge pull request #3610 from arghya88/master
* pr/3610:
  Fix typo
2015-07-28 10:39:44 +02:00
arghya88
64c6e5b403 Fix typo
Closes gh-3610
2015-07-28 10:39:10 +02:00
Stephane Nicoll
ddc2116cad Merge pull request #3608 from izeye/typo-20150728
* pr/3608:
  Fix typos
2015-07-28 08:55:03 +02:00
izeye
ee6fc8d917 Fix typos
Closes gh-3608
2015-07-28 08:54:47 +02:00
Stephane Nicoll
32128a6ac2 Polish 2015-07-27 16:02:03 +02:00
Stephane Nicoll
7fc7e47621 Merge pull request #3606 from arghya88/master
* pr/3606:
  Fix typo
2015-07-27 15:31:15 +02:00
arghya88
9de4fd7913 Fix typo
Closes gh-3606
2015-07-27 15:30:48 +02:00
Stephane Nicoll
8550d58e66 Merge pull request #3600 from joshiste/test-fix-locale
* pr/3600:
  Polish
  Add locale customization of the ObjectMapper
2015-07-27 15:15:45 +02:00
Stephane Nicoll
92871ea03e Polish
See gh-3600
2015-07-27 15:15:38 +02:00
Johannes Stelzer
64461bb978 Add locale customization of the ObjectMapper
Add a new spring.jackson.locale property to customize the locale of the
ObjectMapper.

Closes gh-3600
2015-07-27 15:15:30 +02:00
Stephane Nicoll
4c5a1036a3 Merge branch '1.2.x' 2015-07-27 14:58:37 +02:00
Pei-Tang Huang
3953baba81 Add SQLServer XA DataSource class name
Closes gh-3604
2015-07-27 14:58:10 +02:00
Stephane Nicoll
fdee56138d Merge branch '1.2.x' 2015-07-27 08:18:27 +02:00
Stephane Nicoll
057824aca7 Fix maven plugin configuration
Closes gh-3601
2015-07-27 08:18:09 +02:00
Stephane Nicoll
94405455dd Fix maven plugin configuration
Closes gh-3601
2015-07-26 09:09:43 +02:00
Stephane Nicoll
e033daed0f Use standard name for main thread
DevTools look for a main thread named "main". The maven plugin is
actually using a different value and there is no real reason to. This
change fixes DevTools support as long as forking is enabled.

See gh-3315
2015-07-24 10:36:14 +02:00
Stephane Nicoll
42e230192f Polish 2015-07-24 07:19:53 +02:00
Stephane Nicoll
d6e914be87 Add auto-startup configuration property
Allow to disable the auto-startup flag of the default JMS and RabbitMQ
containers. This effectively permit to disable automatic listening via
configuration.

Closes gh-3587
2015-07-24 06:49:27 +02:00
Stephane Nicoll
aa3393f18c Merge pull request #3589 from izeye/patch-36
* pr/3589:
  Remove an unused parameter
2015-07-24 05:56:49 +02:00
izeye
a242415bb1 Remove an unused parameter
Closes gh-3589
2015-07-24 05:55:40 +02:00
Stephane Nicoll
8ea6b99ed6 Merge pull request #3588 from justingarrick/fix-web-ui-sample
* pr/3588:
  Remove unnecessary mainClassName
  Fix package name of web-ui sample
2015-07-23 17:37:03 +02:00
Stephane Nicoll
7c3cdead28 Remove unnecessary mainClassName
Since each sample has (supposedly) only one application class and not
a lot of the code, the `mainClassName` attribute in the gradle build is
not really useful and can lead to inconsistency if the application class
is moved.

See gh-3588
2015-07-23 17:36:41 +02:00
Justin Garrick
8960b88020 Fix package name of web-ui sample
Closes gh-3588
2015-07-23 17:26:48 +02:00
Stephane Nicoll
3b5fa5a6a3 Clean server.context-path if necessary
While the doc states that the default value is '/', setting that value
explicitly will lead to an error since we enforce that the default root
is the empty string.

Changing the doc will probably be more confusing than anything else so
we're now cleaning the user's provided value if necessary

Closes gh-3554
2015-07-23 14:22:52 +02:00
Andy Wilkinson
37edee4f5e List classes with no class-level conditions in the auto-config report
This commit adds a new "Unconditional classes" section to the
auto-configuration report. It lists any auto-configuration classes
that do not have any class-level conditions, i.e. the class will be
always be part of the application's configuration.

Closes gh-2209
2015-07-23 12:12:43 +01:00
Andy Wilkinson
c0c98b0284 Merge branch '1.2.x' 2015-07-23 12:07:06 +01:00
Andy Wilkinson
6d3660531b Don't set text color of <code> elements when they're beneath an <a>
Closes gh-3583
2015-07-23 12:06:02 +01:00
Andy Wilkinson
24c63c9b55 Adopt RepositoryRestConfigurer and discourage subclassing
A RepositoryRestMvcConfiguration subclass provided by a user is
problematic in a Spring Boot application as it causes
RepositoryRestMvcConfiguration's bean declarations to be processed
before any auto-configuration runs.

One problem that this causes is that it switches off Boot's Jackson
auto-configuration due to RepositoryRestMvcConfiguration having
already declared multiple ObjectMapper beans. Unlike Boot's
auto-configured ObjectMapper, none of these ObjectMappers are marked
as @Primary. This then leads to wiring failures due to multiple
candidates being available.

To address this problem a new RepositoryRestConfigurer abstract has been
introduced in Spring Data Gosling. Its use is now strongly preferred
over subclassing RepositoryRestMvcConfiguration. Note that our own
RepositoryRestMvcConfiguration subclass remains. It is imported as part
of auto-configuration (avoiding the ordering problems described above),
and provides configuration properties binding for
RepositoryRestConfiguration. However, the Jackson ObjectMapper
configuration has been moved out into a new RepositoryRestConfigurer
implementation.

While SpringBootRepositoryRestMvcConfiguration remains, this commit
makes it package private to discourage users from subclassing it. While
this may break existing applications, it, coupled with the documentation
updates, will hopefully guide them toward using
RepositoryRestConfigurer.

Closes gh-3439
2015-07-23 11:58:21 +01:00
Stephane Nicoll
9cd3b20a78 Merge pull request #3566 from drumonii/gh-3510-doc
* pr/3566:
  Polish
  Document validation of nested components
2015-07-23 11:54:06 +02:00
Stephane Nicoll
34891c27de Polish
Closes gh-3566
2015-07-23 11:53:52 +02:00
drumonii
fbf6574b51 Document validation of nested components
See gh-3566
2015-07-23 11:53:06 +02:00
Stephane Nicoll
9244781493 Merge pull request #3534 from lucassaldanha/issue-#3513
* pr/3534:
  Polish
  Add configuration properties validation sample
2015-07-23 11:48:24 +02:00
Stephane Nicoll
80754d5cc2 Polish
Closes gh-3534
2015-07-23 11:46:32 +02:00
Lucas Saldanha
bf303b02f7 Add configuration properties validation sample
Create a new project sample that demonstrate the usage of
@ConfigurationProperties with configurationPropertiesValidator.

Fixes gh-3513
2015-07-23 11:42:55 +02:00
Stephane Nicoll
4596844b90 Merge branch '1.2.x' 2015-07-23 11:37:29 +02:00
Stephane Nicoll
fbfbec1177 Use custom validator on supported classes only
Previously, a customer was set regardless of the fact that it is
supported on the target bean. DataBinder has an actual assertion check
that would fail in such a case.

We now associate the custom validator only if it supports the target
bean.

Fixes gh-3581
2015-07-23 11:37:01 +02:00
izeye
cb0c6843d2 Remove default paths in HAL and Links endpoints as value varies
The default values of fields in @ConfigurationProperties classes are,
where possible, included in the configuration metadata. The default
values for the HAL and Links endpoints vary depending on other
configuration settings. As a result, including a default in the
metadata is misleading.

This commit removes the default assignment of "" to the path fields so
that no default value will be included in the metadata.

Closes gh-3567
2015-07-23 10:32:25 +01:00
Andy Wilkinson
ea85e0d0b0 Merge branch '1.2.x' 2015-07-22 17:55:17 +01:00
Andy Wilkinson
a43cd18ac9 Avoid changing root logger level when setting level of unconfigured logger
Previously getLoggerConfig(loggerName) was used to retrieve the
LoggerConfig object on which the level was to be set. As described in the
method’s javadoc it will “remove tokens from the package name as
necessary or return the root LoggerConfig if no other matches were found”.
This is problematic as, if there’s no configuration for the logger whose
level is being configured, the level will be applied to a logger from an
outer package or to the root logger.

This commit updates Log4J2LoggingSystem to use the configuration’s map of
LoggerConfigs, rather than calling getLoggerConfig. In the event of the
level being set on an unconfigured logger, this will produce a null
LoggerConfig. When a null LoggerConfig is encountered, a new one is
created with the appropriate level. If the config already exists, its
level is set as it was before.

The code that was accessing the root logger using a magic null value
(which was then coerced into the root logger’s name (an empty string))
has also been updated to make it clearer that they are purposefully
dealing with the root logger.

Closes gh-3550
2015-07-22 17:50:07 +01:00
Dave Syer
e1dec6061d Make MongoRepositoriesAutoConfiguration order more explicit
It has to come after MongoDataAutoConfiguration (not
MongoAutoConfiguration) because it looks for beans that are defined
there (e.g. MongoMappingContext which is the one that scans for entities).

Fixes gh-3577
2015-07-22 16:46:49 +01:00