Merge branch '2.0.x'

This commit is contained in:
Phillip Webb
2018-10-11 16:19:29 -07:00
4 changed files with 82 additions and 14 deletions

View File

@@ -652,6 +652,21 @@ details.
[[boot-features-encrypting-properties]]
=== Encrypting Properties
Spring Boot does not provide any built in support for encrypting property values, however,
it does provide the hook points necessary to modify values contained in the Spring
`Environment`. The `EnvironmentPostProcessor` interface allows you to manipulate the
`Environment` before the application starts. See <<howto-customize-the-environment-or-application-context>>
for details.
If you're looking for a secure way to store credentials and passwords, the
https://cloud.spring.io/spring-cloud-vault/[Spring Cloud Vault] project provides
support for storing externalized configuration in
https://www.vaultproject.io/[HashiCorp Vault].
[[boot-features-external-config-yaml]]
=== Using YAML Instead of Properties
http://yaml.org[YAML] is a superset of JSON and, as such, is a convenient format for
@@ -6959,6 +6974,10 @@ that the driver exits after each test and that a new instance is injected. If yo
not want this behavior, you can add `@Scope("singleton")` to your `WebDriver` `@Bean`
definition.
WARNING: The `webDriver` scope created by Spring Boot will replace any user defined scope
of the same name. If you define your own `webDriver` scope you may find it stops working
when you use `@WebMvcTest`.
If you have Spring Security on the classpath, `@WebMvcTest` will also scan `WebSecurityConfigurer`
beans. Instead of disabling security completely for such tests, you can use Spring Security's test support.
More details on how to use Spring Security's `MockMvc` support can be found in

View File

@@ -749,16 +749,23 @@ listings for Maven and Gradle:
.Gradle
[source,groovy,indent=0,subs="attributes"]
----
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
}
dependencies {
compile("org.springframework.boot:spring-boot-devtools")
developmentOnly("org.springframework.boot:spring-boot-devtools")
}
----
NOTE: Developer tools are automatically disabled when running a fully packaged
application. If your application is launched from `java -jar` or if it is started from a
special classloader, then it is considered a "`production application`". Flagging the
dependency as optional in Maven or using `compileOnly` in Gradle is a best practice that
prevents devtools from being transitively applied to other modules that use your project.
dependency as optional in Maven or using a custom`developmentOnly` configuration in
Gradle (as shown above) is a best practice that prevents devtools from being transitively
applied to other modules that use your project.
TIP: Repackaged archives do not contain devtools by default. If you want to use a
<<using-boot-devtools-remote,certain remote devtools feature>>, you need to disable the