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
abbdbb07
Commit
abbdbb07
authored
Dec 21, 2020
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish "Upgrade to Embedded Mongo 3.0.0"
See gh-24254
parent
2f6b51ba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
6 deletions
+8
-6
DownloadConfigBuilderCustomizer.java
...igure/mongo/embedded/DownloadConfigBuilderCustomizer.java
+1
-1
EmbeddedMongoAutoConfiguration.java
...figure/mongo/embedded/EmbeddedMongoAutoConfiguration.java
+7
-5
No files found.
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/embedded/DownloadConfigBuilderCustomizer.java
View file @
abbdbb07
/*
* Copyright 2012-20
19
the original author or authors.
* Copyright 2012-20
20
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-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/mongo/embedded/EmbeddedMongoAutoConfiguration.java
View file @
abbdbb07
...
...
@@ -40,6 +40,7 @@ import de.flapdoodle.embed.process.config.RuntimeConfig;
import
de.flapdoodle.embed.process.config.io.ProcessOutput
;
import
de.flapdoodle.embed.process.config.store.DownloadConfig
;
import
de.flapdoodle.embed.process.config.store.ImmutableDownloadConfig
;
import
de.flapdoodle.embed.process.distribution.Version.GenericVersion
;
import
de.flapdoodle.embed.process.io.Processors
;
import
de.flapdoodle.embed.process.io.Slf4jLevel
;
import
de.flapdoodle.embed.process.io.progress.Slf4jProgressListener
;
...
...
@@ -148,14 +149,16 @@ public class EmbeddedMongoAutoConfiguration {
return
version
;
}
}
return
Versions
.
withFeatures
(
de
.
flapdoodle
.
embed
.
process
.
distribution
.
Version
.
of
(
embeddedProperties
.
getVersion
()));
return
Versions
.
withFeatures
(
createEmbeddedMongoVersion
(
embeddedProperties
));
}
return
Versions
.
withFeatures
(
de
.
flapdoodle
.
embed
.
process
.
distribution
.
Version
.
of
(
embeddedProperties
.
getVersion
()),
return
Versions
.
withFeatures
(
createEmbeddedMongoVersion
(
embeddedProperties
),
embeddedProperties
.
getFeatures
().
toArray
(
new
Feature
[
0
]));
}
private
GenericVersion
createEmbeddedMongoVersion
(
EmbeddedMongoProperties
embeddedProperties
)
{
return
de
.
flapdoodle
.
embed
.
process
.
distribution
.
Version
.
of
(
embeddedProperties
.
getVersion
());
}
private
InetAddress
getHost
()
throws
UnknownHostException
{
if
(
this
.
properties
.
getHost
()
==
null
)
{
return
InetAddress
.
getByAddress
(
Network
.
localhostIsIPv6
()
?
IP6_LOOPBACK_ADDRESS
:
IP4_LOOPBACK_ADDRESS
);
...
...
@@ -200,7 +203,6 @@ public class EmbeddedMongoAutoConfiguration {
ProcessOutput
processOutput
=
new
ProcessOutput
(
Processors
.
logTo
(
logger
,
Slf4jLevel
.
INFO
),
Processors
.
logTo
(
logger
,
Slf4jLevel
.
ERROR
),
Processors
.
named
(
"[console>]"
,
Processors
.
logTo
(
logger
,
Slf4jLevel
.
DEBUG
)));
return
Defaults
.
runtimeConfigFor
(
Command
.
MongoD
,
logger
).
processOutput
(
processOutput
)
.
artifactStore
(
getArtifactStore
(
logger
,
downloadConfigBuilderCustomizers
.
orderedStream
()))
.
isDaemonProcess
(
false
).
build
();
...
...
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