diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/SpringBootWebSecurityConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/SpringBootWebSecurityConfigurationTests.java index 5d695e0acbb..6df06f57206 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/SpringBootWebSecurityConfigurationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/SpringBootWebSecurityConfigurationTests.java @@ -21,6 +21,8 @@ import org.junit.Test; import static org.junit.Assert.assertTrue; /** + * Tests for {@link SpringBootWebSecurityConfiguration}. + * * @author Dave Syer */ public class SpringBootWebSecurityConfigurationTests { diff --git a/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc b/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc index 1f08b411959..32c7f1333c4 100644 --- a/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc +++ b/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc @@ -244,6 +244,9 @@ content into your application; rather pick only the properties that you need. liquibase.default-schema= # default database schema to use liquibase.drop-first=false liquibase.enabled=true + liquibase.url= # specific JDBC url (if not set the default datasource is used) + liquibase.user= # user name for liquibase.url + liquibase.password= # password for liquibase.url # JMX spring.jmx.enabled=true # Expose MBeans from Spring diff --git a/spring-boot-docs/src/main/asciidoc/howto.adoc b/spring-boot-docs/src/main/asciidoc/howto.adoc index 8ce89277c42..5c0745b619f 100644 --- a/spring-boot-docs/src/main/asciidoc/howto.adoc +++ b/spring-boot-docs/src/main/asciidoc/howto.adoc @@ -1364,6 +1364,25 @@ You will get the best results if you put this in a nested class, or a standalone order of instantiation). The {github-code}/spring-boot-samples/spring-boot-sample-web-secure[secure web sample] is a useful template to follow. +If you experience instantiation issues (e.g. using JDBC or JPA for the user detail store) +it might be worth extracting the `AuthenticationManagerBuilder` callback into a +`GlobalAuthenticationConfigurerAdapter` (in the `init()` method so it happens before the +authentication manager is needed elsewhere), e.g. + +[source,java,indent=0,subs="verbatim,quotes,attributes"] +---- + @Configuration + public class AuthenticationManagerConfiguration extends + + GlobalAuthenticationConfigurerAdapter { + @Override + public void init(AuthenticationManagerBuilder auth) { + auth.inMemoryAuthentication() // ... etc. + } + + } +---- + [[howto-enable-https]] diff --git a/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc b/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc index 1bf205300ca..0994f1b8a4d 100644 --- a/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/production-ready-features.adoc @@ -199,9 +199,9 @@ exposed. For example, you could add the following to your `application.propertie [[production-ready-application-info-automatic-expansion]] ==== Automatically expand info properties at build time -Rather than hardcoding some properties that are also specified in your project's -build configuration, you can automatically expand info properties using the -existing build configuration instead. This is possible in both Maven and Gradle. +Rather than hardcoding some properties that are also specified in your project's build +configuration, you can automatically expand info properties using the existing build +configuration instead. This is possible in both Maven and Gradle. @@ -246,9 +246,9 @@ the Java plugin's `processResources` task to do so: [source,groovy,indent=0] ---- -processResources { - expand(project.properties) -} + processResources { + expand(project.properties) + } ---- You can then refer to your Gradle project's properties via placeholders, e.g. diff --git a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index b111a571e4a..8dc9eee9ff9 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -369,7 +369,7 @@ For example, the following YAML document: [source,yaml,indent=0] ---- environments: - dev: + dev:` url: http://dev.bar.com name: Developer Setup prod: diff --git a/spring-boot-tools/spring-boot-gradle-plugin/src/main/groovy/org/springframework/boot/gradle/run/RunPluginFeatures.java b/spring-boot-tools/spring-boot-gradle-plugin/src/main/groovy/org/springframework/boot/gradle/run/RunPluginFeatures.java index 8f6feb2a503..181f185433d 100644 --- a/spring-boot-tools/spring-boot-gradle-plugin/src/main/groovy/org/springframework/boot/gradle/run/RunPluginFeatures.java +++ b/spring-boot-tools/spring-boot-gradle-plugin/src/main/groovy/org/springframework/boot/gradle/run/RunPluginFeatures.java @@ -78,10 +78,7 @@ public class RunPluginFeatures implements PluginFeatures { if (project.hasProperty("applicationDefaultJvmArgs")) { return project.property("applicationDefaultJvmArgs"); } - else { - return Collections.emptyList(); - } - + return Collections.emptyList(); } }); }