Commit Graph

5339 Commits (64461bb978aac4bbb9e70f0c807e2e0099d06811)
 

Author SHA1 Message Date
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
9 years ago
Stephane Nicoll 4c5a1036a3 Merge branch '1.2.x' 9 years ago
Pei-Tang Huang 3953baba81 Add SQLServer XA DataSource class name
Closes gh-3604
9 years ago
Stephane Nicoll fdee56138d Merge branch '1.2.x' 9 years ago
Stephane Nicoll 057824aca7 Fix maven plugin configuration
Closes gh-3601
9 years ago
Stephane Nicoll 94405455dd Fix maven plugin configuration
Closes gh-3601
9 years ago
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
9 years ago
Stephane Nicoll 42e230192f Polish 9 years ago
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
9 years ago
Stephane Nicoll aa3393f18c Merge pull request #3589 from izeye/patch-36
* pr/3589:
  Remove an unused parameter
9 years ago
izeye a242415bb1 Remove an unused parameter
Closes gh-3589
9 years ago
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
9 years ago
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
9 years ago
Justin Garrick 8960b88020 Fix package name of web-ui sample
Closes gh-3588
9 years ago
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
9 years ago
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
9 years ago
Andy Wilkinson c0c98b0284 Merge branch '1.2.x' 9 years ago
Andy Wilkinson 6d3660531b Don't set text color of <code> elements when they're beneath an <a>
Closes gh-3583
9 years ago
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
9 years ago
Stephane Nicoll 9cd3b20a78 Merge pull request #3566 from drumonii/gh-3510-doc
* pr/3566:
  Polish
  Document validation of nested components
9 years ago
Stephane Nicoll 34891c27de Polish
Closes gh-3566
9 years ago
drumonii fbf6574b51 Document validation of nested components
See gh-3566
9 years ago
Stephane Nicoll 9244781493 Merge pull request #3534 from lucassaldanha/issue-#3513
* pr/3534:
  Polish
  Add configuration properties validation sample
9 years ago
Stephane Nicoll 80754d5cc2 Polish
Closes gh-3534
9 years ago
Lucas Saldanha bf303b02f7 Add configuration properties validation sample
Create a new project sample that demonstrate the usage of
@ConfigurationProperties with configurationPropertiesValidator.

Fixes gh-3513
9 years ago
Stephane Nicoll 4596844b90 Merge branch '1.2.x' 9 years ago
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
9 years ago
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
9 years ago
Andy Wilkinson ea85e0d0b0 Merge branch '1.2.x' 9 years ago
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
9 years ago
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
9 years ago
Stephane Nicoll e9a6245a44 Remove unnecessary System.out 9 years ago
Stephane Nicoll 178c690d37 Fix meta-data root attributes ordering 9 years ago
Stephane Nicoll 16dac01886 Polish 9 years ago
Andy Wilkinson 434f528e0a Fix Gradle plugin task dependencies broken by removal of app plugin
8673250 updated the plugin so that the application plugin is no longer
applied by default. This exposed three problems:

 1. bootRepackage may run before findMainClass has run, leaving it with
    an unknown main class.
 2. findMainClass may run before the classes have been built, making it
    unable to find the main class by examining the class files
 3. The project's mainClassName property was still being used as a
    convention for the bootRun task's main property. If the application
    plugin has not be applied, then this property does not exist.

The first problem has been addressed by configuring bootRepackage to
depend on findMainClass.

The second problem has been addressed by configuring the main source
set's output as an input of findMainClass, and configuring findMainClass
to depend on the tasks that build the output.

The third problem has been addressed by only using the mainClassName
property if it exists and its value is not null. We then fallback to
using the mainClassName property on the project's extra properties in
the same way. 

See gh-2679
9 years ago
Andy Wilkinson 8673250955 Make use of Gradle's application plugin optional when using Boot plugin
Previously, the Spring Boot Gradle plugin would always apply the
application plugin to a project. It then piggy-backed on the application
plugin’s mainClassName and applicationDefaultJvmArgs properties for the
configuration of the bootRun task.

This commit updates the Spring Boot Gradle plugin so that it no longer
applies the application plugin. If the user applies the application
plugin then its configuration will be used, but it’s a no longer
requirement.

Users who do not need the application plugin, but who were using the
mainClassName or applicationDefaultJvmArgs properties will need to
change their builds as a result of this change as those properties will
no longer exist. As before, the mainClassName can be configured on the
springBoot extension:

springBoot {
	mainClassName 'com.example.YourApplication'
}

The applicationDefaultJvmArgs property can be used, but it must now be
declared with the project's ext block. For example:

ext {
	applicationDefaultJvmArgs = [ '-Dcom.example.property=true' ]
}

Closes gh-2679
9 years ago
Andy Wilkinson dbc22f6f07 Merge branch '1.2.x' 9 years ago
Andy Wilkinson 9b6538d5bd Upgrade to Groovy 2.4.4
Typically, a Spring Boot maintenance release would not move to a new
minor version of a dependency. However there is a security
vulnerability in Groovy [1] and 2.4.4 is the only release which
contains a fix for it.

The commit upgrades to 2.4.4, thereby ensuring that users of Groovy
are not vulnerable by default. Users of Groovy whose applications are
not affected by the vulnerability may choose to downgrade back to
2.3.11 by overriding Spring Boot's dependency management.

Closes gh-3540

[1] http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-3253
9 years ago
Dave Syer da816526bd Add additional pre-validation check in ResourceServerProperties
With this change a user can have `@EnableOAuth2Client` without
`@EnableOAuth2Sso`.

Fixes gh-3568
9 years ago
Phillip Webb 6f6f898739 Polish 9 years ago
Phillip Webb 5d74ea2861 Merge branch '1.2.x' 9 years ago
Phillip Webb d2d71934b6 Polish 9 years ago
Stephane Nicoll 6333786819 Fix wrong default value 9 years ago
Stephane Nicoll 84b689ce61 Merge pull request #3561 from izeye/docs-20150720
* pr/3561:
  Polish docs
9 years ago
izeye 672281c214 Polish docs
Closes gh-3561
9 years ago
Stephane Nicoll 3e26273013 Polish 9 years ago
Dave Syer c5008f844c Make sure bean resolver is set in the OAuth2 expression evaluator
Also copies the ExpressionParser (the only public getter), trust
resolver and permission evaluator (if available in the context). Changes
the logic to not replace an existing OAuth2MethodSecurityExpressionHandler
so that users can override simply by providing a bean of that type.

Fixes gh-3542
9 years ago
Dave Syer c181a2d157 Add simple performance test for properties binding 9 years ago
Stephane Nicoll 43c5151ee1 Merge branch '1.2.x' 9 years ago
Stephane Nicoll 539b009d12 Clean management context path if necessary
Various areas of the code expect the management's context path to not
contain any trailing slash but nothing is enforcing it. We now make sure
to remove any trailing slash, including the one for '/' and make that
explicit via the Javadoc of the getter.

Fixes gh-3553
9 years ago