Browse Source
bootRun's main and jvmArgs properties use mainClassName and applicationDefaultJvmArgs respectively by convention. bootJar and bootWar's mainClass property uses mainClassName by convention.pull/8686/merge
8 changed files with 108 additions and 17 deletions
@ -0,0 +1,11 @@
@@ -0,0 +1,11 @@
|
||||
buildscript { |
||||
dependencies { |
||||
classpath files(pluginClasspath.split(',')) |
||||
} |
||||
} |
||||
|
||||
apply plugin: 'java' |
||||
apply plugin: 'org.springframework.boot' |
||||
apply plugin: 'application' |
||||
|
||||
mainClassName = 'com.example.CustomMain' |
||||
@ -0,0 +1,11 @@
@@ -0,0 +1,11 @@
|
||||
buildscript { |
||||
dependencies { |
||||
classpath files(pluginClasspath.split(',')) |
||||
} |
||||
} |
||||
|
||||
apply plugin: 'war' |
||||
apply plugin: 'org.springframework.boot' |
||||
apply plugin: 'application' |
||||
|
||||
mainClassName = 'com.example.CustomMain' |
||||
@ -0,0 +1,14 @@
@@ -0,0 +1,14 @@
|
||||
buildscript { |
||||
dependencies { |
||||
classpath files(pluginClasspath.split(',')) |
||||
} |
||||
} |
||||
|
||||
apply plugin: 'application' |
||||
apply plugin: 'org.springframework.boot' |
||||
|
||||
applicationDefaultJvmArgs = ['-Dcom.foo=bar', '-Dcom.bar=baz'] |
||||
|
||||
task echoJvmArguments { |
||||
println 'JVM arguments = ' + bootRun.jvmArgs |
||||
} |
||||
@ -0,0 +1,14 @@
@@ -0,0 +1,14 @@
|
||||
buildscript { |
||||
dependencies { |
||||
classpath files(pluginClasspath.split(',')) |
||||
} |
||||
} |
||||
|
||||
apply plugin: 'application' |
||||
apply plugin: 'org.springframework.boot' |
||||
|
||||
mainClassName = 'com.example.CustomMainClass' |
||||
|
||||
task echoMainClassName { |
||||
println 'Main class name = ' + bootRun.main |
||||
} |
||||
Loading…
Reference in new issue