1136 Commits

Author SHA1 Message Date
drumonii
fbf6574b51 Document validation of nested components
See gh-3566
2015-07-23 11:53:06 +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
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
2015-07-22 11:38:15 +01:00
Phillip Webb
6f6f898739 Polish 2015-07-20 10:22:10 -07:00
Stephane Nicoll
6333786819 Fix wrong default value 2015-07-20 15:42:46 +02:00
izeye
672281c214 Polish docs
Closes gh-3561
2015-07-20 15:40:44 +02:00
izeye
31d8a647d0 Fix typos
Closes gh-3531
2015-07-17 09:08:47 +02:00
Stephane Nicoll
03abd20542 Polish
Add missing default value
2015-07-17 09:07:08 +02:00
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
2015-07-16 17:29:20 -07:00
Phillip Webb
728e64b929 Polish 2015-07-16 12:56:49 -07:00
Sebastien Deleuze
4405ae4eaf Add CORS documentation
Closes gh-3052
2015-07-16 17:41:54 +01:00
Andy Wilkinson
9f9f21207f Document support for comma-separated list of names in <springProfile>
See gh-3493
2015-07-16 17:34:11 +01:00
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
2015-07-16 17:04:15 +01:00
Andy Wilkinson
f9ab189262 Correct the link to Embedded Mongo in the reference documentation 2015-07-16 17:04:14 +01:00
Stephane Nicoll
d9939a5be2 Map FATAL level for Log4j
Make sure that Boot's FATAL level is mapped to log4j and log4j2 properly.

Fixes gh-3518
2015-07-16 17:59:04 +02:00
Andy Wilkinson
2c81907d58 Flesh out and polish Embedded MongoDB auto-configuration contribution
Embedded MongoDB is now auto-configured when it is on the classpath.
The Mongo instance will listen on the port specified by the
spring.data.mongodb.port property. If this property has a value of
zero and randomly allocated port will be used. In such an event, the
MongoClient created by MongoAutoConfiguration will be automatically
configured to use the port that was allocated.

By default, MongoDB 2.6.10 will be used. This can be configured using
the spring.embedded-mongodb.version property. Mongo's sync delay
feature is enabled by default. This can be configured using the
spring.embedded-mongobd.features property.

Closes gh-2002
2015-07-16 16:34:18 +01:00
Stephane Nicoll
4aace564a2 Fix typo
Closes gh-3519
2015-07-16 15:28:24 +02:00
Stephane Nicoll
aa483984c5 Polish 1683d8a8
Closes gh-3475
2015-07-16 15:22:38 +02:00
Stephane Nicoll
22a7b0cdee Customize default JmsListenerFactory
Expose acknowledgment mode and concurrency settings in configuration for
 the default `JmsListenerContainerFactory`

 Closes gh-3519
2015-07-16 14:39:48 +02:00
Stephane Nicoll
256ebe09ed Fix broken build 2015-07-16 10:05:20 +02:00
Stephane Nicoll
6ace7e53ed Clarify doc
Add an explicit note about the need of Spring MVC for actuator HTTP
endpoints. Also explicitly mention Jersey since it can be a source of
confusion.

See gh-2025
2015-07-16 09:04:17 +02:00
Stephane Nicoll
a9737c016c Review doc
Replace server.tomcat.compression example as Boot does no longer define
that property
2015-07-15 17:56:58 +02:00
Stephane Nicoll
f75333dce2 Improve doc 2015-07-15 16:00:54 +02:00
izeye
f4589e7cc3 Fix typos
Closes gh-3504
2015-07-15 15:45:02 +02:00
Stephane Nicoll
f2d32d3e98 Add support for property deprecation
Previously, an item could only have a 'deprecated' boolean flag to
indicate that the property is deprecated. It is desirable to provide an
additional description for the deprecation as well as the name of the
property to use instead.

The `deprecated` boolean flag is now supported. Instead, a `deprecated`
object can be specified with two optional attributes: `reason` to provide
an explanation for the deprecation and `replacement` to refer to the
property that should be used instead. If none of them is present, an
empty deprecation object should be set.

For backward compatibility, the `deprecated` field is still set.

Deprecation information can only set via manual meta-data.

Closes gh-3449
2015-07-15 15:41:52 +02:00
Andy Wilkinson
b1e9139efe Allow Jackson’s time zone to be configured via the environment
This commit adds a new property, spring.jackson.time-zone, that can be
used to configure the time zone that Jackson uses when configuring
dates. It affects the serialisation of both JDK and Joda date types.

Closes gh-3505
2015-07-15 14:34:58 +01:00
Phillip Webb
f0f5f78e25 Polish 2015-07-14 22:17:52 -07:00
Andy Wilkinson
8493755178 Configure CLI with repositories from active profiles in settings.xml
This commit enhances the CLI to use the repositories configured in the
profiles declared in a user's Maven settings.xml file during
dependency resolution. A profile must be active for its repositories
to be used.

Closes gh-2703
Closes gh-3483
2015-07-14 12:30:18 +01:00
Dave Syer
bfa816f2a3 Maintain classpath order in PropertiesLauncher
I think this is safe, judging by the integration tests, but I'm not
putting it in 1.2.x until we've had some feedback on it. The
integration tests actually had a bug that was masking this problem
because they were merging Properties from the whole classpath instead
of picking the first available resource (which is generally what
we do in Spring Boot applications for application.properties for
instance).

Fixes gh-3048
2015-07-14 10:22:36 +01:00
Stephane Nicoll
7ba7693e65 Polish doc
See gh-3457
2015-07-13 13:48:13 +02:00
Stephane Nicoll
cb5eccb5c1 Add missing handle-as meta-data
Liquibase has a `changeLog` property that is definitely used as a
`Resource` but cannot be defined as such as the original String value
should be kept against an API we don't control.

Update the tests also to make it more clear that if hints are added
against a property that is detected automatically, said property still
keeps all its auto-discovered capabilities.

Closes gh-3457
2015-07-13 13:45:23 +02:00
Andrew Landsverk
85621a34fb Fix typo in devtools doc
Closes gh-3463
2015-07-13 10:42:51 +01:00
Stephane Nicoll
3664895f04 Polish 2015-07-12 09:20:12 +02:00
Ivan Sopov
5f25080091 Add HTTP compression excludeUserAgents property
Closes gh-3363
2015-07-10 16:31:55 -07:00
Rob Baily
177ea459f1 Support log pattern properties with logback
Update AbstractLoggingSystem to pass LoggingInitializationContext to
loadDefaults() method to enable access to the environment.
DefaultLogbackConfiguration now uses this to find log pattern overrides.

Fixes gh-3367
Closes gh-3405
2015-07-10 15:23:46 -07:00
Melvin Kicchi
3d83c6fcb2 Fix typo in jOOQ example code
Closes gh-3461
2015-07-10 13:54:00 -07:00
Stephane Nicoll
1ce418cfdc Fix meta-data for logging.level property 2015-07-10 18:12:24 +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
Phillip Webb
eeb947b382 Polish docs 2015-07-09 12:56:03 -07:00
Stephane Nicoll
c5ae68a1ec Clarify enum provider purpose 2015-07-09 14:38:48 +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
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
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
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
Phillip Webb
a087dbc9c3 Add flyway and liquibase endpoint documentation
See gh-3434
2015-07-07 18:58:25 -07:00
Phillip Webb
e885dab752 Polish 2015-07-07 15:17:03 -07:00
Stephane Nicoll
406d4ea771 Polish 2015-07-07 17:19:00 +02:00