Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
35379f62
Commit
35379f62
authored
Jul 06, 2015
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
e8085016
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
32 additions
and
30 deletions
+32
-30
ClassPathFileSystemWatcher.java
...k/boot/devtools/classpath/ClassPathFileSystemWatcher.java
+2
-2
spring-boot-features.adoc
spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc
+17
-16
SpringApplicationConfiguration.java
...ngframework/boot/test/SpringApplicationConfiguration.java
+9
-8
ArrayDocumentMatcher.java
...a/org/springframework/boot/yaml/ArrayDocumentMatcher.java
+1
-1
SpringProfileDocumentMatcher.java
...ringframework/boot/yaml/SpringProfileDocumentMatcher.java
+1
-1
testprofilesempty.yml
spring-boot/src/test/resources/testprofilesempty.yml
+2
-2
No files found.
spring-boot-devtools/src/main/java/org/springframework/boot/devtools/classpath/ClassPathFileSystemWatcher.java
View file @
35379f62
...
...
@@ -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
*/
...
...
spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc
View file @
35379f62
...
...
@@ -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
...
...
spring-boot/src/main/java/org/springframework/boot/test/SpringApplicationConfiguration.java
View file @
35379f62
...
...
@@ -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"
)
...
...
spring-boot/src/main/java/org/springframework/boot/yaml/ArrayDocumentMatcher.java
View file @
35379f62
/*
* Copyright 2012-201
3
the original author or authors.
* Copyright 2012-201
5
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.
...
...
spring-boot/src/main/java/org/springframework/boot/yaml/SpringProfileDocumentMatcher.java
View file @
35379f62
/*
* Copyright 2012-201
4
the original author or authors.
* Copyright 2012-201
5
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.
...
...
spring-boot/src/test/resources/testprofilesempty.yml
View file @
35379f62
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment