mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Only run InitCommand if there is code to process
This appears to be a significant improvement in performance (checking for the existence of init.grooy is cheap, but compiling it is expensive). I'm going to say this fixes gh-212.
This commit is contained in:
parent
322af41d72
commit
420fc69983
@ -79,7 +79,7 @@ public class InitCommand extends OptionParsingCommand {
|
||||
"init.groovy", "spring.groovy");
|
||||
String[] sources = sourceOptions.getSourcesArray();
|
||||
|
||||
if (!(loader instanceof GroovyClassLoader)) {
|
||||
if (!(loader instanceof GroovyClassLoader) && sources.length > 0) {
|
||||
|
||||
List<RepositoryConfiguration> repositoryConfiguration = RepositoryConfigurationFactory
|
||||
.createDefaultRepositoryConfiguration();
|
||||
|
Loading…
Reference in New Issue
Block a user