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
d8c64abd
Commit
d8c64abd
authored
Nov 21, 2019
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '2.1.x' into 2.2.x
Closes gh-19086
parents
9fe721d7
c2221b9f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
5 deletions
+12
-5
CloudFoundryVcapEnvironmentPostProcessor.java
.../boot/cloud/CloudFoundryVcapEnvironmentPostProcessor.java
+11
-5
spring.factories
.../spring-boot/src/main/resources/META-INF/spring.factories
+1
-0
No files found.
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/cloud/CloudFoundryVcapEnvironmentPostProcessor.java
View file @
d8c64abd
...
@@ -22,14 +22,14 @@ import java.util.List;
...
@@ -22,14 +22,14 @@ import java.util.List;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Properties
;
import
java.util.Properties
;
import
org.apache.commons.logging.Log
;
import
org.apache.commons.logging.LogFactory
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.context.config.ConfigFileApplicationListener
;
import
org.springframework.boot.context.config.ConfigFileApplicationListener
;
import
org.springframework.boot.context.event.ApplicationPreparedEvent
;
import
org.springframework.boot.env.EnvironmentPostProcessor
;
import
org.springframework.boot.env.EnvironmentPostProcessor
;
import
org.springframework.boot.json.JsonParser
;
import
org.springframework.boot.json.JsonParser
;
import
org.springframework.boot.json.JsonParserFactory
;
import
org.springframework.boot.json.JsonParserFactory
;
import
org.springframework.boot.logging.DeferredLog
;
import
org.springframework.context.ApplicationListener
;
import
org.springframework.core.Ordered
;
import
org.springframework.core.Ordered
;
import
org.springframework.core.env.CommandLinePropertySource
;
import
org.springframework.core.env.CommandLinePropertySource
;
import
org.springframework.core.env.ConfigurableEnvironment
;
import
org.springframework.core.env.ConfigurableEnvironment
;
...
@@ -89,9 +89,10 @@ import org.springframework.util.StringUtils;
...
@@ -89,9 +89,10 @@ import org.springframework.util.StringUtils;
* @author Andy Wilkinson
* @author Andy Wilkinson
* @since 1.3.0
* @since 1.3.0
*/
*/
public
class
CloudFoundryVcapEnvironmentPostProcessor
implements
EnvironmentPostProcessor
,
Ordered
{
public
class
CloudFoundryVcapEnvironmentPostProcessor
implements
EnvironmentPostProcessor
,
Ordered
,
ApplicationListener
<
ApplicationPreparedEvent
>
{
private
static
final
Log
logger
=
LogFactory
.
getLog
(
CloudFoundryVcapEnvironmentPostProcessor
.
class
);
private
static
final
DeferredLog
logger
=
new
DeferredLog
(
);
private
static
final
String
VCAP_APPLICATION
=
"VCAP_APPLICATION"
;
private
static
final
String
VCAP_APPLICATION
=
"VCAP_APPLICATION"
;
...
@@ -127,6 +128,11 @@ public class CloudFoundryVcapEnvironmentPostProcessor implements EnvironmentPost
...
@@ -127,6 +128,11 @@ public class CloudFoundryVcapEnvironmentPostProcessor implements EnvironmentPost
}
}
}
}
@Override
public
void
onApplicationEvent
(
ApplicationPreparedEvent
event
)
{
logger
.
switchTo
(
CloudFoundryVcapEnvironmentPostProcessor
.
class
);
}
private
void
addWithPrefix
(
Properties
properties
,
Properties
other
,
String
prefix
)
{
private
void
addWithPrefix
(
Properties
properties
,
Properties
other
,
String
prefix
)
{
for
(
String
key
:
other
.
stringPropertyNames
())
{
for
(
String
key
:
other
.
stringPropertyNames
())
{
String
prefixed
=
prefix
+
key
;
String
prefixed
=
prefix
+
key
;
...
...
spring-boot-project/spring-boot/src/main/resources/META-INF/spring.factories
View file @
d8c64abd
...
@@ -23,6 +23,7 @@ org.springframework.boot.web.context.ServerPortInfoApplicationContextInitializer
...
@@ -23,6 +23,7 @@ org.springframework.boot.web.context.ServerPortInfoApplicationContextInitializer
org.springframework.context.ApplicationListener=\
org.springframework.context.ApplicationListener=\
org.springframework.boot.ClearCachesApplicationListener,\
org.springframework.boot.ClearCachesApplicationListener,\
org.springframework.boot.builder.ParentContextCloserApplicationListener,\
org.springframework.boot.builder.ParentContextCloserApplicationListener,\
org.springframework.boot.cloud.CloudFoundryVcapEnvironmentPostProcessor,\
org.springframework.boot.context.FileEncodingApplicationListener,\
org.springframework.boot.context.FileEncodingApplicationListener,\
org.springframework.boot.context.config.AnsiOutputApplicationListener,\
org.springframework.boot.context.config.AnsiOutputApplicationListener,\
org.springframework.boot.context.config.ConfigFileApplicationListener,\
org.springframework.boot.context.config.ConfigFileApplicationListener,\
...
...
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