Commit 35379f62 authored by Phillip Webb's avatar Phillip Webb

Polish

parent e8085016
......@@ -48,8 +48,8 @@ public class ClassPathFileSystemWatcher implements InitializingBean, DisposableB
/**
* Create a new {@link ClassPathFileSystemWatcher} instance.
* @param fileSystemWatcherFactory a factory to create
* the underlying {@link FileSystemWatcher} used to monitor the local file system
* @param fileSystemWatcherFactory a factory to create the underlying
* {@link FileSystemWatcher} used to monitor the local file system
* @param restartStrategy the classpath restart strategy
* @param urls the URLs to watch
*/
......
......@@ -380,7 +380,7 @@ environment variables or system properties.
[[boot-features-external-config-profile-specific-properties]]
=== Profile-specific properties
In addition to `application.properties` files, profile-specific properties can also be
defined using the naming convention `application-{profile}.properties`. The
defined using the naming convention `application-{profile}.properties`. The
`Environment` has a set of default profiles (by default `[default]`) which are
used if no active profiels are set (i.e. if no profiles are explicitly activated
then properties from `application-default.properties` are loaded).
......@@ -529,29 +529,30 @@ context starts. So in this YAML we set a value for `security.user.password` that
[source,yaml,indent=0]
----
server:
port: 80000
---
spring:
profiles: default
security:
user:
password: weak
server:
port: 80000
---
spring:
profiles: default
security:
user:
password: weak
----
whereas in this example, the password is always set because it isn't attached to any profile,
and it would have to be explicitly reset in all other profiles as necessary:
whereas in this example, the password is always set because it isn't attached to any
profile, and it would have to be explicitly reset in all other profiles as necessary:
[source,yaml,indent=0]
----
server:
port: 80000
security:
user:
password: weak
server:
port: 80000
security:
user:
password: weak
----
[[boot-features-external-config-yaml-shortcomings]]
==== YAML shortcomings
YAML files can't be loaded via the `@PropertySource` annotation. So in the
......
......@@ -31,8 +31,9 @@ import org.springframework.test.context.ContextConfiguration;
/**
* Class-level annotation that is used to determine how to load and configure an
* {@code ApplicationContext} for integration tests.
* <p>Similar to the standard {@link ContextConfiguration @ContextConfiguration}
* but uses Spring Boot's {@link SpringApplicationContextLoader}.
* <p>
* Similar to the standard {@link ContextConfiguration @ContextConfiguration} but uses
* Spring Boot's {@link SpringApplicationContextLoader}.
*
* @author Dave Syer
* @author Sam Brannen
......@@ -47,42 +48,42 @@ import org.springframework.test.context.ContextConfiguration;
public @interface SpringApplicationConfiguration {
/**
* @see ContextConfiguration#locations
* @see ContextConfiguration#locations()
* @return the context configuration locations
*/
@AliasFor(annotation = ContextConfiguration.class, attribute = "locations")
String[] locations() default {};
/**
* @see ContextConfiguration#classes
* @see ContextConfiguration#classes()
* @return the context configuration classes
*/
@AliasFor(annotation = ContextConfiguration.class, attribute = "classes")
Class<?>[] classes() default {};
/**
* @see ContextConfiguration#initializers
* @see ContextConfiguration#initializers()
* @return the context configuration initializers
*/
@AliasFor(annotation = ContextConfiguration.class, attribute = "initializers")
Class<? extends ApplicationContextInitializer<? extends ConfigurableApplicationContext>>[] initializers() default {};
/**
* @see ContextConfiguration#inheritLocations
* @see ContextConfiguration#inheritLocations()
* @return {@code true} if context locations should be inherited
*/
@AliasFor(annotation = ContextConfiguration.class, attribute = "inheritLocations")
boolean inheritLocations() default true;
/**
* @see ContextConfiguration#inheritInitializers
* @see ContextConfiguration#inheritInitializers()
* @return {@code true} if context initializers should be inherited
*/
@AliasFor(annotation = ContextConfiguration.class, attribute = "inheritInitializers")
boolean inheritInitializers() default true;
/**
* @see ContextConfiguration#name
* @see ContextConfiguration#name()
* @return the name of the context hierarchy level
*/
@AliasFor(annotation = ContextConfiguration.class, attribute = "name")
......
/*
* Copyright 2012-2013 the original author or authors.
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......
......@@ -4,11 +4,11 @@ my:
other: notempty
---
spring:
profiles:
profiles:
my:
property: fromemptyprofile
---
spring:
profiles: other
my:
property: fromotherprofile
\ No newline at end of file
property: fromotherprofile
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment