Skip to content

Commit 3b52753

Browse files
committed
Version 1.0.1
1 parent 50b3182 commit 3b52753

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ plugins {
1515
id 'org.asciidoctor.convert' version '1.5.3'
1616
}
1717

18-
version "1.0.1.BUILD-SNAPSHOT"
18+
version "1.0.1"
1919
group "org.grails.plugins"
2020

2121
apply plugin:"eclipse"

src/main/groovy/org/grails/plugin/embedded/mongodb/EmbeddedMongoDBGrailsPlugin.groovy

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ class EmbeddedMongoDBGrailsPlugin extends Plugin {
4040
Version.valueOf("V" + version.replaceAll(/(\.|-)/, '_').toUpperCase())
4141
}
4242

43+
static MongodExecutable mongodExecutable = null
44+
4345
Closure doWithSpring() {{->
4446
if (Environment.current == Environment.TEST) {
4547
IRuntimeConfig runtimeConfig = new RuntimeConfigBuilder()
@@ -54,9 +56,15 @@ class EmbeddedMongoDBGrailsPlugin extends Plugin {
5456
.net(new Net("127.0.0.1", getPort(), Network.localhostIsIPv6()))
5557
.build()
5658

57-
MongodExecutable mongodExecutable = starter.prepare(mongodConfig)
59+
mongodExecutable = starter.prepare(mongodConfig)
5860
mongodExecutable.start()
5961
}
6062
}}
6163

64+
void onShutdown(evt) {
65+
if (mongodExecutable != null) {
66+
mongodExecutable.stop()
67+
}
68+
}
69+
6270
}

0 commit comments

Comments
 (0)