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
ed973536
Commit
ed973536
authored
Feb 06, 2014
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply source cleanup and formatting
parent
80f2336f
Changes
36
Hide whitespace changes
Inline
Side-by-side
Showing
36 changed files
with
60 additions
and
74 deletions
+60
-74
AutoConfigurationReportEndpoint.java
...oot/actuate/endpoint/AutoConfigurationReportEndpoint.java
+1
-1
MetricCopyExporterTests.java
.../boot/actuate/metrics/export/MetricCopyExporterTests.java
+2
-1
RichGaugeExporterTests.java
...k/boot/actuate/metrics/export/RichGaugeExporterTests.java
+2
-1
DefaultCounterServiceTests.java
...ot/actuate/metrics/writer/DefaultCounterServiceTests.java
+2
-1
AutoConfigurationPackages.java
...amework/boot/autoconfigure/AutoConfigurationPackages.java
+2
-2
SpringBootCondition.java
...ork/boot/autoconfigure/condition/SpringBootCondition.java
+2
-2
AutoConfigurationReportTests.java
...autoconfigure/condition/AutoConfigurationReportTests.java
+0
-2
AutoConfigurationReportLoggingInitializerTests.java
...gging/AutoConfigurationReportLoggingInitializerTests.java
+0
-1
NoArgumentsException.java
...pringframework/boot/cli/command/NoArgumentsException.java
+0
-1
OptionHandler.java
...ringframework/boot/cli/command/options/OptionHandler.java
+2
-2
CommandRunnerIntegrationTests.java
...ework/boot/cli/command/CommandRunnerIntegrationTests.java
+0
-1
ResolveDependencyCoordinatesTransformationTests.java
...iler/ResolveDependencyCoordinatesTransformationTests.java
+0
-1
ManagedDependenciesArtifactCoordinatesResolverTests.java
.../ManagedDependenciesArtifactCoordinatesResolverTests.java
+0
-1
SampleMongoApplicationTests.java
...t/java/sample/data/mongo/SampleMongoApplicationTests.java
+2
-2
SampleSecureApplicationTests.java
...test/java/sample/secure/SampleSecureApplicationTests.java
+6
-5
SampleSecureApplicationTests.java
...t/java/sample/ui/secure/SampleSecureApplicationTests.java
+0
-1
SpringBootPlugin.java
...ovy/org/springframework/boot/gradle/SpringBootPlugin.java
+8
-5
SpringBootResolutionStrategy.java
...ngframework/boot/gradle/SpringBootResolutionStrategy.java
+1
-2
ProjectLibraries.java
...rg/springframework/boot/gradle/task/ProjectLibraries.java
+9
-6
Repackage.java
...roovy/org/springframework/boot/gradle/task/Repackage.java
+10
-5
RunApp.java
...n/groovy/org/springframework/boot/gradle/task/RunApp.java
+10
-8
YamlPropertySourceLoader.java
...springframework/boot/config/YamlPropertySourceLoader.java
+1
-1
VcapApplicationListenerTests.java
...ework/boot/cloudfoundry/VcapApplicationListenerTests.java
+0
-1
ConfigFileApplicationListenerTests.java
...ework/boot/config/ConfigFileApplicationListenerTests.java
+0
-3
ContextIdApplicationContextInitializerTests.java
.../context/ContextIdApplicationContextInitializerTests.java
+0
-1
FileEncodingApplicationListenerTests.java
...rk/boot/context/FileEncodingApplicationListenerTests.java
+0
-1
EnvironmentDelegateApplicationContextInitializerTests.java
...nvironmentDelegateApplicationContextInitializerTests.java
+0
-1
EnvironmentDelegateApplicationListenerTests.java
...text/env/EnvironmentDelegateApplicationListenerTests.java
+0
-1
JacksonParserTests.java
...ava/org/springframework/boot/json/JacksonParserTests.java
+0
-3
SimpleJsonParserTests.java
.../org/springframework/boot/json/SimpleJsonParserTests.java
+0
-2
YamlJsonParserTests.java
...va/org/springframework/boot/json/YamlJsonParserTests.java
+0
-3
LoggingApplicationListenerTests.java
...amework/boot/logging/LoggingApplicationListenerTests.java
+0
-2
ArrayDocumentMatcherTests.java
.../springframework/boot/yaml/ArrayDocumentMatcherTests.java
+0
-1
YamlMapFactoryBeanTests.java
...rg/springframework/boot/yaml/YamlMapFactoryBeanTests.java
+0
-1
YamlProcessorTests.java
...ava/org/springframework/boot/yaml/YamlProcessorTests.java
+0
-1
YamlPropertiesFactoryBeanTests.java
...ngframework/boot/yaml/YamlPropertiesFactoryBeanTests.java
+0
-1
No files found.
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/AutoConfigurationReportEndpoint.java
View file @
ed973536
...
...
@@ -22,9 +22,9 @@ import java.util.Map;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.actuate.endpoint.AutoConfigurationReportEndpoint.Report
;
import
org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport
;
import
org.springframework.boot.autoconfigure.condition.ConditionOutcome
;
import
org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport.ConditionAndOutcome
;
import
org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport.ConditionAndOutcomes
;
import
org.springframework.boot.autoconfigure.condition.ConditionOutcome
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
import
org.springframework.context.annotation.Condition
;
import
org.springframework.util.ClassUtils
;
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/export/MetricCopyExporterTests.java
View file @
ed973536
...
...
@@ -31,7 +31,8 @@ public class MetricCopyExporterTests {
private
final
InMemoryMetricRepository
writer
=
new
InMemoryMetricRepository
();
private
final
InMemoryMetricRepository
reader
=
new
InMemoryMetricRepository
();
private
final
MetricCopyExporter
exporter
=
new
MetricCopyExporter
(
this
.
reader
,
this
.
writer
);
private
final
MetricCopyExporter
exporter
=
new
MetricCopyExporter
(
this
.
reader
,
this
.
writer
);
@Test
public
void
export
()
{
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/export/RichGaugeExporterTests.java
View file @
ed973536
...
...
@@ -31,7 +31,8 @@ public class RichGaugeExporterTests {
private
final
InMemoryRichGaugeRepository
reader
=
new
InMemoryRichGaugeRepository
();
private
final
InMemoryMetricRepository
writer
=
new
InMemoryMetricRepository
();
private
final
RichGaugeExporter
exporter
=
new
RichGaugeExporter
(
this
.
reader
,
this
.
writer
);
private
final
RichGaugeExporter
exporter
=
new
RichGaugeExporter
(
this
.
reader
,
this
.
writer
);
@Test
public
void
prefixedMetricsCopied
()
{
...
...
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/metrics/writer/DefaultCounterServiceTests.java
View file @
ed973536
...
...
@@ -30,7 +30,8 @@ public class DefaultCounterServiceTests {
private
final
MetricWriter
repository
=
mock
(
MetricWriter
.
class
);
private
final
DefaultCounterService
service
=
new
DefaultCounterService
(
this
.
repository
);
private
final
DefaultCounterService
service
=
new
DefaultCounterService
(
this
.
repository
);
@Test
public
void
incrementPrependsCounter
()
{
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/AutoConfigurationPackages.java
View file @
ed973536
...
...
@@ -21,7 +21,7 @@ import java.util.List;
import
org.springframework.beans.factory.BeanFactory
;
import
org.springframework.beans.factory.NoSuchBeanDefinitionException
;
import
org.springframework.beans.factory.
support.Abstract
BeanDefinition
;
import
org.springframework.beans.factory.
config.
BeanDefinition
;
import
org.springframework.beans.factory.support.BeanDefinitionRegistry
;
import
org.springframework.beans.factory.support.GenericBeanDefinition
;
import
org.springframework.context.annotation.ImportBeanDefinitionRegistrar
;
...
...
@@ -65,7 +65,7 @@ public abstract class AutoConfigurationPackages {
beanDefinition
.
setBeanClass
(
BasePackage
.
class
);
beanDefinition
.
getConstructorArgumentValues
().
addIndexedArgumentValue
(
0
,
packageName
);
beanDefinition
.
setRole
(
Abstract
BeanDefinition
.
ROLE_INFRASTRUCTURE
);
beanDefinition
.
setRole
(
BeanDefinition
.
ROLE_INFRASTRUCTURE
);
registry
.
registerBeanDefinition
(
BEAN
,
beanDefinition
);
}
...
...
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/SpringBootCondition.java
View file @
ed973536
...
...
@@ -76,8 +76,8 @@ public abstract class SpringBootCondition implements Condition {
return
message
;
}
private
void
recordEvaluation
(
ConditionContext
context
,
String
classOrMethodName
,
ConditionOutcome
outcome
)
{
private
void
recordEvaluation
(
ConditionContext
context
,
String
classOrMethodName
,
ConditionOutcome
outcome
)
{
if
(
context
.
getBeanFactory
()
!=
null
)
{
ConditionEvaluationReport
.
get
(
context
.
getBeanFactory
())
.
recordConditionEvaluation
(
classOrMethodName
,
this
,
outcome
);
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/condition/AutoConfigurationReportTests.java
View file @
ed973536
...
...
@@ -29,8 +29,6 @@ import org.mockito.MockitoAnnotations;
import
org.springframework.beans.factory.annotation.Configurable
;
import
org.springframework.beans.factory.config.ConfigurableListableBeanFactory
;
import
org.springframework.beans.factory.support.DefaultListableBeanFactory
;
import
org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport
;
import
org.springframework.boot.autoconfigure.condition.ConditionOutcome
;
import
org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport.ConditionAndOutcome
;
import
org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport.ConditionAndOutcomes
;
import
org.springframework.boot.autoconfigure.web.MultipartAutoConfiguration
;
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/logging/AutoConfigurationReportLoggingInitializerTests.java
View file @
ed973536
...
...
@@ -32,7 +32,6 @@ import org.mockito.stubbing.Answer;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.PropertyPlaceholderAutoConfiguration
;
import
org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport
;
import
org.springframework.boot.autoconfigure.logging.AutoConfigurationReportLoggingInitializer
;
import
org.springframework.boot.autoconfigure.web.HttpMessageConvertersAutoConfiguration
;
import
org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration
;
import
org.springframework.boot.event.ApplicationFailedEvent
;
...
...
spring-boot-cli/src/main/java/org/springframework/boot/cli/command/NoArgumentsException.java
View file @
ed973536
...
...
@@ -16,7 +16,6 @@
package
org
.
springframework
.
boot
.
cli
.
command
;
/**
* Exception used to indicate that no arguemnts were specified.
*
...
...
spring-boot-cli/src/main/java/org/springframework/boot/cli/command/options/OptionHandler.java
View file @
ed973536
...
...
@@ -31,8 +31,6 @@ import java.util.Map;
import
java.util.Set
;
import
java.util.TreeSet
;
import
org.springframework.boot.cli.command.OptionParsingCommand
;
import
joptsimple.BuiltinHelpFormatter
;
import
joptsimple.HelpFormatter
;
import
joptsimple.OptionDescriptor
;
...
...
@@ -40,6 +38,8 @@ import joptsimple.OptionParser;
import
joptsimple.OptionSet
;
import
joptsimple.OptionSpecBuilder
;
import
org.springframework.boot.cli.command.OptionParsingCommand
;
/**
* Delegate used by {@link OptionParsingCommand} to parse options and run the command.
*
...
...
spring-boot-cli/src/test/java/org/springframework/boot/cli/command/CommandRunnerIntegrationTests.java
View file @
ed973536
...
...
@@ -18,7 +18,6 @@ package org.springframework.boot.cli.command;
import
org.junit.Rule
;
import
org.junit.Test
;
import
org.springframework.boot.cli.command.CommandRunner
;
import
org.springframework.boot.cli.command.run.RunCommand
;
import
org.springframework.boot.cli.util.OutputCapture
;
...
...
spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/ResolveDependencyCoordinatesTransformationTests.java
View file @
ed973536
...
...
@@ -42,7 +42,6 @@ import org.codehaus.groovy.control.io.ReaderSource;
import
org.codehaus.groovy.transform.ASTTransformation
;
import
org.junit.Before
;
import
org.junit.Test
;
import
org.springframework.boot.cli.compiler.ResolveDependencyCoordinatesTransformation
;
import
org.springframework.boot.cli.compiler.dependencies.ArtifactCoordinatesResolver
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
...
...
spring-boot-cli/src/test/java/org/springframework/boot/cli/compiler/dependencies/ManagedDependenciesArtifactCoordinatesResolverTests.java
View file @
ed973536
...
...
@@ -18,7 +18,6 @@ package org.springframework.boot.cli.compiler.dependencies;
import
org.junit.Before
;
import
org.junit.Test
;
import
org.springframework.boot.cli.compiler.dependencies.ManagedDependenciesArtifactCoordinatesResolver
;
import
org.springframework.boot.dependency.tools.Dependency
;
import
org.springframework.boot.dependency.tools.ManagedDependencies
;
...
...
spring-boot-samples/spring-boot-sample-data-mongodb/src/test/java/sample/data/mongo/SampleMongoApplicationTests.java
View file @
ed973536
...
...
@@ -16,8 +16,6 @@
package
sample
.
data
.
mongo
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
java.net.ConnectException
;
import
org.junit.Rule
;
...
...
@@ -25,6 +23,8 @@ import org.junit.Test;
import
org.springframework.boot.test.OutputCapture
;
import
org.springframework.core.NestedCheckedException
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
/**
* Tests for {@link SampleMongoApplication}.
*
...
...
spring-boot-samples/spring-boot-sample-secure/src/test/java/sample/secure/SampleSecureApplicationTests.java
View file @
ed973536
...
...
@@ -16,8 +16,6 @@
package
sample
.
secure
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
org.junit.After
;
import
org.junit.Before
;
import
org.junit.Test
;
...
...
@@ -37,6 +35,8 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import
sample.secure.SampleSecureApplicationTests.TestConfiguration
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
/**
* Basic integration tests for demo application.
*
...
...
@@ -57,9 +57,10 @@ public class SampleSecureApplicationTests {
@Before
public
void
init
()
{
AuthenticationManager
authenticationManager
=
context
.
getBean
(
AuthenticationManager
.
class
);
authentication
=
authenticationManager
.
authenticate
(
new
UsernamePasswordAuthenticationToken
(
"user"
,
"password"
));
AuthenticationManager
authenticationManager
=
context
.
getBean
(
AuthenticationManager
.
class
);
authentication
=
authenticationManager
.
authenticate
(
new
UsernamePasswordAuthenticationToken
(
"user"
,
"password"
));
}
@After
...
...
spring-boot-samples/spring-boot-sample-web-secure/src/test/java/sample/ui/secure/SampleSecureApplicationTests.java
View file @
ed973536
...
...
@@ -38,7 +38,6 @@ import org.springframework.http.client.ClientHttpResponse;
import
org.springframework.web.client.DefaultResponseErrorHandler
;
import
org.springframework.web.client.RestTemplate
;
import
sample.ui.secure.SampleSecureApplication
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
...
...
spring-boot-tools/spring-boot-gradle-plugin/src/main/groovy/org/springframework/boot/gradle/SpringBootPlugin.java
View file @
ed973536
...
...
@@ -29,7 +29,7 @@ import org.springframework.boot.gradle.task.RunApp;
/**
* Gradle 'Spring Boot' {@link Plugin}.
*
*
* @author Phillip Webb
* @author Dave Syer
*/
...
...
@@ -59,7 +59,8 @@ public class SpringBootPlugin implements Plugin<Project> {
private
void
applyRun
(
Project
project
)
{
addRunAppTask
(
project
);
// register BootRepackage so that we can use task foo(type: BootRepackage) {}
project
.
getExtensions
().
getExtraProperties
().
set
(
"BootRepackage"
,
Repackage
.
class
);
project
.
getExtensions
().
getExtraProperties
()
.
set
(
"BootRepackage"
,
Repackage
.
class
);
}
private
void
applyResolutionStrategy
(
Project
project
)
{
...
...
@@ -80,14 +81,16 @@ public class SpringBootPlugin implements Plugin<Project> {
+
"archives so that they can be executed from the command "
+
"line using 'java -jar'"
);
packageTask
.
setGroup
(
BasePlugin
.
BUILD_GROUP
);
packageTask
.
dependsOn
(
project
.
getConfigurations
().
getByName
(
Dependency
.
ARCHIVES_CONFIGURATION
).
getAllArtifacts
().
getBuildDependencies
());
packageTask
.
dependsOn
(
project
.
getConfigurations
()
.
getByName
(
Dependency
.
ARCHIVES_CONFIGURATION
).
getAllArtifacts
()
.
getBuildDependencies
());
return
packageTask
;
}
private
void
addRunAppTask
(
Project
project
)
{
RunApp
runJarTask
=
project
.
getTasks
().
create
(
RUN_APP_TASK_NAME
,
RunApp
.
class
);
runJarTask
.
setDescription
(
"Run the project with support for auto-detecting main class and reloading static resources"
);
runJarTask
.
setDescription
(
"Run the project with support for "
+
"auto-detecting main class and reloading static resources"
);
runJarTask
.
setGroup
(
"Execution"
);
runJarTask
.
dependsOn
(
"assemble"
);
}
...
...
spring-boot-tools/spring-boot-gradle-plugin/src/main/groovy/org/springframework/boot/gradle/SpringBootResolutionStrategy.java
View file @
ed973536
package
org
.
springframework
.
boot
.
gradle
;
import
org.gradle.api.Action
;
...
...
@@ -11,7 +10,7 @@ import org.springframework.boot.dependency.tools.ManagedDependencies;
/**
* A resolution strategy to resolve missing version numbers using the
* 'spring-boot-dependencies' POM.
*
*
* @author Phillip Webb
*/
public
class
SpringBootResolutionStrategy
{
...
...
spring-boot-tools/spring-boot-gradle-plugin/src/main/groovy/org/springframework/boot/gradle/task/ProjectLibraries.java
View file @
ed973536
...
...
@@ -64,16 +64,18 @@ class ProjectLibraries implements Libraries {
@Override
public
void
doWithLibraries
(
LibraryCallback
callback
)
throws
IOException
{
FileCollection
custom
=
this
.
customConfigurationName
!=
null
?
this
.
project
.
getConfigurations
().
findByName
(
this
.
customConfigurationName
)
:
null
;
FileCollection
custom
=
this
.
customConfigurationName
!=
null
?
this
.
project
.
getConfigurations
().
findByName
(
this
.
customConfigurationName
)
:
null
;
if
(
custom
!=
null
)
{
libraries
(
LibraryScope
.
CUSTOM
,
custom
,
callback
);
}
else
{
FileCollection
compile
=
this
.
project
.
getConfigurations
().
getByName
(
"compile"
);
}
else
{
FileCollection
compile
=
this
.
project
.
getConfigurations
()
.
getByName
(
"compile"
);
FileCollection
runtime
=
this
.
project
.
getConfigurations
().
getByName
(
"runtime"
);
FileCollection
runtime
=
this
.
project
.
getConfigurations
()
.
getByName
(
"runtime"
);
runtime
=
runtime
.
minus
(
compile
);
FileCollection
provided
=
this
.
project
.
getConfigurations
().
findByName
(
...
...
@@ -98,4 +100,5 @@ class ProjectLibraries implements Libraries {
}
}
}
}
spring-boot-tools/spring-boot-gradle-plugin/src/main/groovy/org/springframework/boot/gradle/task/Repackage.java
View file @
ed973536
...
...
@@ -60,7 +60,8 @@ public class Repackage extends DefaultTask {
}
if
(
this
.
customConfiguration
!=
null
)
{
libraries
.
setCustomConfigurationName
(
this
.
customConfiguration
);
}
else
if
(
extension
.
getCustomConfiguration
()
!=
null
)
{
}
else
if
(
extension
.
getCustomConfiguration
()
!=
null
)
{
libraries
.
setCustomConfigurationName
(
extension
.
getCustomConfiguration
());
}
project
.
getTasks
().
withType
(
Jar
.
class
,
new
Action
<
Jar
>()
{
...
...
@@ -85,12 +86,14 @@ public class Repackage extends DefaultTask {
long
startTime
=
System
.
currentTimeMillis
();
try
{
return
super
.
findMainMethod
(
source
);
}
finally
{
}
finally
{
long
duration
=
System
.
currentTimeMillis
()
-
startTime
;
if
(
duration
>
FIND_WARNING_TIMEOUT
)
{
getLogger
().
warn
(
"Searching for the main-class is taking some time, "
getLogger
()
.
warn
(
"Searching for the "
+
"main-class is taking some time, "
+
"consider using setting 'springBoot.mainClass'"
);
}
}
...
...
@@ -103,7 +106,8 @@ public class Repackage extends DefaultTask {
repackager
.
setBackupSource
(
extension
.
isBackupSource
());
try
{
repackager
.
repackage
(
libraries
);
}
catch
(
IOException
ex
)
{
}
catch
(
IOException
ex
)
{
throw
new
IllegalStateException
(
ex
.
getMessage
(),
ex
);
}
}
...
...
@@ -111,4 +115,5 @@ public class Repackage extends DefaultTask {
}
});
}
}
spring-boot-tools/spring-boot-gradle-plugin/src/main/groovy/org/springframework/boot/gradle/task/RunApp.java
View file @
ed973536
...
...
@@ -36,7 +36,7 @@ import org.springframework.boot.loader.tools.MainClassFinder;
/**
* Run the project from Gradle.
*
*
* @author Dave Syer
*/
public
class
RunApp
extends
DefaultTask
{
...
...
@@ -54,15 +54,15 @@ public class RunApp extends DefaultTask {
@Override
public
void
execute
(
SourceSet
set
)
{
if
(
SourceSet
.
MAIN_SOURCE_SET_NAME
.
equals
(
set
.
getName
()))
{
main
=
set
;
RunApp
.
this
.
main
=
set
;
}
};
});
final
Set
<
File
>
allResources
=
new
LinkedHashSet
<
File
>();
if
(
main
!=
null
)
{
SourceDirectorySet
resources
=
main
.
getResources
();
if
(
this
.
main
!=
null
)
{
SourceDirectorySet
resources
=
this
.
main
.
getResources
();
allResources
.
addAll
(
resources
.
getSrcDirs
());
}
...
...
@@ -70,13 +70,13 @@ public class RunApp extends DefaultTask {
@Override
public
void
execute
(
JavaExec
exec
)
{
ArrayList
<
File
>
files
=
new
ArrayList
<
File
>(
exec
.
getClasspath
()
.
getFiles
());
ArrayList
<
File
>
files
=
new
ArrayList
<
File
>(
exec
.
getClasspath
()
.
getFiles
());
files
.
addAll
(
0
,
allResources
);
getLogger
().
info
(
"Adding classpath: "
+
allResources
);
exec
.
setClasspath
(
new
SimpleFileCollection
(
files
));
if
(
exec
.
getMain
()
==
null
)
{
final
String
mainClass
=
findMainClass
(
main
);
final
String
mainClass
=
findMainClass
(
RunApp
.
this
.
main
);
exec
.
setMain
(
mainClass
);
exec
.
getConventionMapping
().
map
(
"main"
,
new
Callable
<
String
>()
{
...
...
@@ -84,6 +84,7 @@ public class RunApp extends DefaultTask {
public
String
call
()
throws
Exception
{
return
mainClass
;
}
});
getLogger
().
info
(
"Found main: "
+
mainClass
);
}
...
...
@@ -100,7 +101,8 @@ public class RunApp extends DefaultTask {
getLogger
().
info
(
"Looking for main in: "
+
main
.
getOutput
().
getClassesDir
());
try
{
return
MainClassFinder
.
findMainClass
(
main
.
getOutput
().
getClassesDir
());
}
catch
(
IOException
ex
)
{
}
catch
(
IOException
ex
)
{
throw
new
IllegalStateException
(
"Cannot find main class"
,
ex
);
}
}
...
...
spring-boot/src/main/java/org/springframework/boot/config/YamlPropertySourceLoader.java
View file @
ed973536
...
...
@@ -24,9 +24,9 @@ import java.util.Set;
import
org.springframework.boot.yaml.DefaultProfileDocumentMatcher
;
import
org.springframework.boot.yaml.SpringProfileDocumentMatcher
;
import
org.springframework.boot.yaml.YamlPropertiesFactoryBean
;
import
org.springframework.boot.yaml.YamlProcessor.DocumentMatcher
;
import
org.springframework.boot.yaml.YamlProcessor.MatchStatus
;
import
org.springframework.boot.yaml.YamlPropertiesFactoryBean
;
import
org.springframework.core.env.PropertySource
;
import
org.springframework.core.io.Resource
;
import
org.springframework.util.StringUtils
;
...
...
spring-boot/src/test/java/org/springframework/boot/cloudfoundry/VcapApplicationListenerTests.java
View file @
ed973536
...
...
@@ -18,7 +18,6 @@ package org.springframework.boot.cloudfoundry;
import
org.junit.Test
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.cloudfoundry.VcapApplicationListener
;
import
org.springframework.boot.event.ApplicationEnvironmentPreparedEvent
;
import
org.springframework.boot.test.EnvironmentTestUtils
;
import
org.springframework.context.ConfigurableApplicationContext
;
...
...
spring-boot/src/test/java/org/springframework/boot/config/ConfigFileApplicationListenerTests.java
View file @
ed973536
...
...
@@ -24,9 +24,6 @@ import org.junit.Rule;
import
org.junit.Test
;
import
org.junit.rules.ExpectedException
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.config.ConfigFileApplicationListener
;
import
org.springframework.boot.config.PropertySourceLoader
;
import
org.springframework.boot.config.PropertySourceLoadersFactory
;
import
org.springframework.boot.event.ApplicationEnvironmentPreparedEvent
;
import
org.springframework.boot.test.EnvironmentTestUtils
;
import
org.springframework.context.ConfigurableApplicationContext
;
...
...
spring-boot/src/test/java/org/springframework/boot/context/ContextIdApplicationContextInitializerTests.java
View file @
ed973536
...
...
@@ -17,7 +17,6 @@
package
org
.
springframework
.
boot
.
context
;
import
org.junit.Test
;
import
org.springframework.boot.context.ContextIdApplicationContextInitializer
;
import
org.springframework.boot.test.EnvironmentTestUtils
;
import
org.springframework.context.ConfigurableApplicationContext
;
import
org.springframework.context.annotation.AnnotationConfigApplicationContext
;
...
...
spring-boot/src/test/java/org/springframework/boot/context/FileEncodingApplicationListenerTests.java
View file @
ed973536
...
...
@@ -19,7 +19,6 @@ package org.springframework.boot.context;
import
org.junit.Assume
;
import
org.junit.Test
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.context.FileEncodingApplicationListener
;
import
org.springframework.boot.event.ApplicationEnvironmentPreparedEvent
;
import
org.springframework.boot.test.EnvironmentTestUtils
;
import
org.springframework.core.env.ConfigurableEnvironment
;
...
...
spring-boot/src/test/java/org/springframework/boot/context/env/EnvironmentDelegateApplicationContextInitializerTests.java
View file @
ed973536
...
...
@@ -19,7 +19,6 @@ package org.springframework.boot.context.env;
import
org.junit.Rule
;
import
org.junit.Test
;
import
org.junit.rules.ExpectedException
;
import
org.springframework.boot.context.env.EnvironmentDelegateApplicationContextInitializer
;
import
org.springframework.boot.test.EnvironmentTestUtils
;
import
org.springframework.context.ApplicationContextException
;
import
org.springframework.context.ApplicationContextInitializer
;
...
...
spring-boot/src/test/java/org/springframework/boot/context/env/EnvironmentDelegateApplicationListenerTests.java
View file @
ed973536
...
...
@@ -21,7 +21,6 @@ import org.junit.Rule;
import
org.junit.Test
;
import
org.junit.rules.ExpectedException
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.context.env.EnvironmentDelegateApplicationListener
;
import
org.springframework.boot.event.ApplicationEnvironmentPreparedEvent
;
import
org.springframework.boot.test.EnvironmentTestUtils
;
import
org.springframework.context.ApplicationListener
;
...
...
spring-boot/src/test/java/org/springframework/boot/json/JacksonParserTests.java
View file @
ed973536
...
...
@@ -16,9 +16,6 @@
package
org
.
springframework
.
boot
.
json
;
import
org.springframework.boot.json.JacksonJsonParser
;
import
org.springframework.boot.json.JsonParser
;
/**
* Tests for {@link JsonParser}.
*
...
...
spring-boot/src/test/java/org/springframework/boot/json/SimpleJsonParserTests.java
View file @
ed973536
...
...
@@ -20,8 +20,6 @@ import java.util.List;
import
java.util.Map
;
import
org.junit.Test
;
import
org.springframework.boot.json.JsonParser
;
import
org.springframework.boot.json.SimpleJsonParser
;
import
static
org
.
junit
.
Assert
.
assertEquals
;
...
...
spring-boot/src/test/java/org/springframework/boot/json/YamlJsonParserTests.java
View file @
ed973536
...
...
@@ -16,9 +16,6 @@
package
org
.
springframework
.
boot
.
json
;
import
org.springframework.boot.json.JsonParser
;
import
org.springframework.boot.json.YamlJsonParser
;
/**
* Tests for {@link YamlJsonParser}.
*
...
...
spring-boot/src/test/java/org/springframework/boot/logging/LoggingApplicationListenerTests.java
View file @
ed973536
...
...
@@ -30,8 +30,6 @@ import org.junit.Test;
import
org.junit.rules.TemporaryFolder
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.event.ApplicationStartedEvent
;
import
org.springframework.boot.logging.LogLevel
;
import
org.springframework.boot.logging.LoggingApplicationListener
;
import
org.springframework.boot.logging.java.JavaLoggingSystem
;
import
org.springframework.boot.test.EnvironmentTestUtils
;
import
org.springframework.boot.test.OutputCapture
;
...
...
spring-boot/src/test/java/org/springframework/boot/yaml/ArrayDocumentMatcherTests.java
View file @
ed973536
...
...
@@ -20,7 +20,6 @@ import java.io.IOException;
import
java.util.Properties
;
import
org.junit.Test
;
import
org.springframework.boot.yaml.ArrayDocumentMatcher
;
import
org.springframework.boot.yaml.YamlProcessor.MatchStatus
;
import
org.springframework.core.io.ByteArrayResource
;
import
org.springframework.core.io.support.PropertiesLoaderUtils
;
...
...
spring-boot/src/test/java/org/springframework/boot/yaml/YamlMapFactoryBeanTests.java
View file @
ed973536
...
...
@@ -22,7 +22,6 @@ import java.util.LinkedHashMap;
import
java.util.Map
;
import
org.junit.Test
;
import
org.springframework.boot.yaml.YamlMapFactoryBean
;
import
org.springframework.boot.yaml.YamlProcessor.ResolutionMethod
;
import
org.springframework.core.io.AbstractResource
;
import
org.springframework.core.io.ByteArrayResource
;
...
...
spring-boot/src/test/java/org/springframework/boot/yaml/YamlProcessorTests.java
View file @
ed973536
...
...
@@ -21,7 +21,6 @@ import java.util.Properties;
import
org.junit.Rule
;
import
org.junit.Test
;
import
org.junit.rules.ExpectedException
;
import
org.springframework.boot.yaml.YamlProcessor
;
import
org.springframework.boot.yaml.YamlProcessor.MatchCallback
;
import
org.springframework.core.io.ByteArrayResource
;
import
org.springframework.core.io.Resource
;
...
...
spring-boot/src/test/java/org/springframework/boot/yaml/YamlPropertiesFactoryBeanTests.java
View file @
ed973536
...
...
@@ -24,7 +24,6 @@ import org.junit.Ignore;
import
org.junit.Rule
;
import
org.junit.Test
;
import
org.junit.rules.ExpectedException
;
import
org.springframework.boot.yaml.YamlPropertiesFactoryBean
;
import
org.springframework.boot.yaml.YamlProcessor.DocumentMatcher
;
import
org.springframework.boot.yaml.YamlProcessor.MatchStatus
;
import
org.springframework.boot.yaml.YamlProcessor.ResolutionMethod
;
...
...
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