Commit Graph

5420 Commits (6c7a5c5077d624e85f6db4d870735888f479cc41)
 

Author SHA1 Message Date
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
Stephane Nicoll e1479a02b7 polish
Use canonical version for the management's context path.
9 years ago
Stephane Nicoll 1bf0abc456 Merge branch '1.2.x' 9 years ago
Vladimir Tsanev 8fe9fc25b3 Reserve random port for JBoss tx manager
Closes gh-3546, closes gh-3547
9 years ago
Stephane Nicoll 9d4382caee Merge pull request #3545 from lucassaldanha/json-parser-factory-docs
* pr/3545:
  Polish JsonParserFactory javadoc
9 years ago
Lucas Saldanha 1fc66b434e Polish JsonParserFactory javadoc
Closes gh-3545
9 years ago
Phillip Webb 3b4928c549 Restore ServerProperties.getSessionTimeout()
Restore the deprecated method to give people a change to migrate. The
@DeprecatedConfigurationProperties annotation is now used to generate
the deprecated meta-data, removing the need for manual meta-data.

Closes gh-3537
9 years ago
Phillip Webb e9d252e05c Add @DeprecatedConfigurationProperties annotation
Add a new @DeprecatedConfigurationProperties annotation which can be
used by the `ConfigurationMetadataAnnotationProcessor` to generating
meta-data deprecated blocks.

Fixes gh-3543
9 years ago
Stephane Nicoll db41e0d7d5 Fix duplicate meta-data for server.session-timeout
Closes gh-3537
9 years ago
Stephane Nicoll 61447a5f8b Merge pull request #3531 from izeye/docs-20150717
* pr/3531:
  Fix typos
9 years ago
izeye 31d8a647d0 Fix typos
Closes gh-3531
9 years ago
Stephane Nicoll 03abd20542 Polish
Add missing default value
9 years ago
Phillip Webb d2133687b0 Use persistent servlet session with DevTools
Set `server.session.persistent=true` when running DevTools to ensure
persistent sessions are used.

Fixes gh-3530
9 years ago
Phillip Webb 08d1f6daf5 Allow persistent servlet sessions across restarts
Update Tomcat, Jetty and Undertow to serialize session data when the
application is stopped and load it again when the application restarts.

Persistent session are opt-in; either by setting `persistentSession`
on the ConfigurableEmbeddedServletContainer or by using the property
`server.session.persistent=true`.

Fixes gh-2490
9 years ago
Phillip Webb 3e72300bd4 Add application specific temp folder support
Add ApplicationTemp class which can be used to obtain a temp folder
based on the running application. Allows restarted application to
find temp files saved in a previous run.

Fixes gh-3529
9 years ago
Phillip Webb 728e64b929 Polish 9 years ago
Sebastien Deleuze 4405ae4eaf Add CORS documentation
Closes gh-3052
9 years ago
Andy Wilkinson 9f9f21207f Document support for comma-separated list of names in <springProfile>
See gh-3493
9 years ago
Eddú Meléndez 125de0211b Support multiple names in <springProfile> Logback element
Closes gh-3493
Closes gh-3494
9 years ago
Andy Wilkinson 352ff4e899 Rename Embedded Mongo configuration prefix to spring.mongodb.embedded
Previously, the prefix was spring.embedded-mongodb. This was
inconsistent with the prefixes for Artermis and HornetQ which are
spring.artemis.embedded and spring.hornetq.embedded respectively.

See gh-2002
9 years ago