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
29c3be35
Commit
29c3be35
authored
Feb 26, 2018
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
306c79f0
Changes
27
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
69 additions
and
67 deletions
+69
-67
JerseyManagementChildContextConfiguration.java
...web/jersey/JerseyManagementChildContextConfiguration.java
+1
-1
ControllerEndpointHandlerMapping.java
...dpoint/web/reactive/ControllerEndpointHandlerMapping.java
+1
-1
TraceableHttpServletRequest.java
...ctuate/web/trace/servlet/TraceableHttpServletRequest.java
+1
-1
ConditionMessage.java
...mework/boot/autoconfigure/condition/ConditionMessage.java
+1
-2
ElasticsearchAutoConfiguration.java
...re/data/elasticsearch/ElasticsearchAutoConfiguration.java
+1
-1
SessionAutoConfiguration.java
.../boot/autoconfigure/session/SessionAutoConfiguration.java
+5
-5
AopAutoConfigurationTests.java
...ork/boot/autoconfigure/aop/AopAutoConfigurationTests.java
+1
-1
MessageSourceAutoConfigurationTests.java
...onfigure/context/MessageSourceAutoConfigurationTests.java
+4
-8
RedisAutoConfigurationJedisTests.java
...onfigure/data/redis/RedisAutoConfigurationJedisTests.java
+10
-6
MustacheAutoConfigurationReactiveIntegrationTests.java
...he/MustacheAutoConfigurationReactiveIntegrationTests.java
+2
-2
ReactiveWebServerFactoryCustomizerTests.java
...web/reactive/ReactiveWebServerFactoryCustomizerTests.java
+1
-2
ServletWebServerFactoryCustomizerTests.java
...e/web/servlet/ServletWebServerFactoryCustomizerTests.java
+1
-2
SpringApplicationWebApplicationInitializer.java
...t/cli/app/SpringApplicationWebApplicationInitializer.java
+1
-1
ArchiveCommand.java
...ingframework/boot/cli/command/archive/ArchiveCommand.java
+4
-3
AetherGrapeEngine.java
...gframework/boot/cli/compiler/grape/AetherGrapeEngine.java
+2
-3
ResourceUtils.java
...java/org/springframework/boot/cli/util/ResourceUtils.java
+1
-1
RestartClassLoaderTests.java
...devtools/restart/classloader/RestartClassLoaderTests.java
+1
-1
CloudFoundryCustomContextPathExample.java
...cs/cloudfoundry/CloudFoundryCustomContextPathExample.java
+8
-4
MetadataStore.java
...gframework/boot/configurationprocessor/MetadataStore.java
+5
-5
JavaPluginAction.java
.../springframework/boot/gradle/plugin/JavaPluginAction.java
+2
-3
JarWriter.java
...java/org/springframework/boot/loader/tools/JarWriter.java
+2
-2
RepackagerTests.java
...rg/springframework/boot/loader/tools/RepackagerTests.java
+1
-2
JarFile.java
...ain/java/org/springframework/boot/loader/jar/JarFile.java
+1
-1
SystemPropertyUtils.java
...springframework/boot/loader/util/SystemPropertyUtils.java
+4
-3
SpringPackageScanClassResolver.java
...mework/boot/liquibase/SpringPackageScanClassResolver.java
+1
-1
LambdaSafe.java
...c/main/java/org/springframework/boot/util/LambdaSafe.java
+2
-2
SampleAntApplicationIT.java
...-ant/src/test/java/sample/ant/SampleAntApplicationIT.java
+5
-3
No files found.
spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/web/jersey/JerseyManagementChildContextConfiguration.java
View file @
29c3be35
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
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-actuator/src/main/java/org/springframework/boot/actuate/endpoint/web/reactive/ControllerEndpointHandlerMapping.java
View file @
29c3be35
...
...
@@ -95,7 +95,7 @@ public class ControllerEndpointHandlerMapping extends RequestMappingHandlerMappi
ExposableControllerEndpoint
endpoint
,
RequestMappingInfo
mapping
)
{
Set
<
PathPattern
>
patterns
=
mapping
.
getPatternsCondition
().
getPatterns
();
if
(
patterns
.
isEmpty
())
{
patterns
=
new
HashSet
<
PathPattern
>(
patterns
=
new
HashSet
<>(
Arrays
.
asList
(
getPathPatternParser
().
parse
(
""
)));
}
PathPattern
[]
endpointMappedPatterns
=
patterns
.
stream
()
...
...
spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/web/trace/servlet/TraceableHttpServletRequest.java
View file @
29c3be35
...
...
@@ -77,7 +77,7 @@ final class TraceableHttpServletRequest implements TraceableRequest {
}
private
List
<
String
>
toList
(
Enumeration
<
String
>
enumeration
)
{
List
<
String
>
list
=
new
ArrayList
<
String
>();
List
<
String
>
list
=
new
ArrayList
<>();
while
(
enumeration
.
hasMoreElements
())
{
list
.
add
(
enumeration
.
nextElement
());
}
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/condition/ConditionMessage.java
View file @
29c3be35
...
...
@@ -358,8 +358,7 @@ public final class ConditionMessage {
* @return a built {@link ConditionMessage}
*/
public
ConditionMessage
items
(
Style
style
,
Object
...
items
)
{
return
items
(
style
,
items
==
null
?
null
:
Arrays
.
asList
(
items
));
return
items
(
style
,
items
==
null
?
null
:
Arrays
.
asList
(
items
));
}
/**
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/data/elasticsearch/ElasticsearchAutoConfiguration.java
View file @
29c3be35
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
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/session/SessionAutoConfiguration.java
View file @
29c3be35
...
...
@@ -250,11 +250,11 @@ public class SessionAutoConfiguration {
if
(
storeType
!=
StoreType
.
NONE
&&
this
.
sessionRepositoryProvider
.
getIfAvailable
()
==
null
)
{
if
(
storeType
!=
null
)
{
throw
new
SessionRepositoryUnavailableException
(
"No session "
+
"
repository could be auto-configured, check your "
+
"configuration (session store type is '"
+
storeType
.
name
().
toLowerCase
(
Locale
.
ENGLISH
)
+
"')"
,
storeType
);
throw
new
SessionRepositoryUnavailableException
(
"No session
repository could be auto-configured, check your "
+
"configuration (session store type is '"
+
storeType
.
name
().
toLowerCase
(
Locale
.
ENGLISH
)
+
"')"
,
storeType
);
}
}
}
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/aop/AopAutoConfigurationTests.java
View file @
29c3be35
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
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/test/java/org/springframework/boot/autoconfigure/context/MessageSourceAutoConfigurationTests.java
View file @
29c3be35
...
...
@@ -86,18 +86,14 @@ public class MessageSourceAutoConfigurationTests {
@Test
public
void
testCacheDurationNoUnit
()
{
this
.
contextRunner
.
withPropertyValues
(
"spring.messages.basename:test/messages"
,
"spring.messages.cache-duration=10"
)
.
run
(
assertCache
(
10
*
1000
));
this
.
contextRunner
.
withPropertyValues
(
"spring.messages.basename:test/messages"
,
"spring.messages.cache-duration=10"
).
run
(
assertCache
(
10
*
1000
));
}
@Test
public
void
testCacheDurationWithUnit
()
{
this
.
contextRunner
.
withPropertyValues
(
"spring.messages.basename:test/messages"
,
"spring.messages.cache-duration=1m"
)
.
run
(
assertCache
(
60
*
1000
));
this
.
contextRunner
.
withPropertyValues
(
"spring.messages.basename:test/messages"
,
"spring.messages.cache-duration=1m"
).
run
(
assertCache
(
60
*
1000
));
}
private
ContextConsumer
<
AssertableApplicationContext
>
assertCache
(
long
expected
)
{
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/data/redis/RedisAutoConfigurationJedisTests.java
View file @
29c3be35
...
...
@@ -47,7 +47,8 @@ public class RedisAutoConfigurationJedisTests {
@Test
public
void
testOverrideRedisConfiguration
()
{
this
.
contextRunner
.
withPropertyValues
(
"spring.redis.host:foo"
,
"spring.redis.database:1"
)
this
.
contextRunner
.
withPropertyValues
(
"spring.redis.host:foo"
,
"spring.redis.database:1"
)
.
run
((
context
)
->
{
JedisConnectionFactory
cf
=
context
.
getBean
(
JedisConnectionFactory
.
class
);
...
...
@@ -60,10 +61,12 @@ public class RedisAutoConfigurationJedisTests {
@Test
public
void
testCustomizeRedisConfiguration
()
{
this
.
contextRunner
.
withUserConfiguration
(
CustomConfiguration
.
class
).
run
((
context
)
->
{
JedisConnectionFactory
cf
=
context
.
getBean
(
JedisConnectionFactory
.
class
);
assertThat
(
cf
.
isUseSsl
()).
isTrue
();
});
this
.
contextRunner
.
withUserConfiguration
(
CustomConfiguration
.
class
)
.
run
((
context
)
->
{
JedisConnectionFactory
cf
=
context
.
getBean
(
JedisConnectionFactory
.
class
);
assertThat
(
cf
.
isUseSsl
()).
isTrue
();
});
}
@Test
...
...
@@ -99,7 +102,8 @@ public class RedisAutoConfigurationJedisTests {
@Test
public
void
testPasswordInUrlWithColon
()
{
this
.
contextRunner
.
withPropertyValues
(
"spring.redis.url:redis://:pass:word@example:33"
)
this
.
contextRunner
.
withPropertyValues
(
"spring.redis.url:redis://:pass:word@example:33"
)
.
run
((
context
)
->
{
assertThat
(
context
.
getBean
(
JedisConnectionFactory
.
class
).
getHostName
())
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/mustache/MustacheAutoConfigurationReactiveIntegrationTests.java
View file @
29c3be35
...
...
@@ -72,8 +72,8 @@ public class MustacheAutoConfigurationReactiveIntegrationTests {
}
@Configuration
@Import
({
ReactiveWebServerFactoryAutoConfiguration
.
class
,
WebFluxAutoConfiguration
.
class
,
HttpHandlerAutoConfiguration
.
class
,
@Import
({
ReactiveWebServerFactoryAutoConfiguration
.
class
,
WebFluxAutoConfiguration
.
class
,
HttpHandlerAutoConfiguration
.
class
,
PropertyPlaceholderAutoConfiguration
.
class
})
@Controller
public
static
class
Application
{
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/ReactiveWebServerFactoryCustomizerTests.java
View file @
29c3be35
...
...
@@ -42,8 +42,7 @@ public class ReactiveWebServerFactoryCustomizerTests {
@Before
public
void
setup
()
{
this
.
customizer
=
new
ReactiveWebServerFactoryCustomizer
(
this
.
properties
);
this
.
customizer
=
new
ReactiveWebServerFactoryCustomizer
(
this
.
properties
);
}
@Test
...
...
spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/servlet/ServletWebServerFactoryCustomizerTests.java
View file @
29c3be35
...
...
@@ -62,8 +62,7 @@ public class ServletWebServerFactoryCustomizerTests {
@Before
public
void
setup
()
{
MockitoAnnotations
.
initMocks
(
this
);
this
.
customizer
=
new
ServletWebServerFactoryCustomizer
(
this
.
properties
);
this
.
customizer
=
new
ServletWebServerFactoryCustomizer
(
this
.
properties
);
}
@Test
...
...
spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/app/SpringApplicationWebApplicationInitializer.java
View file @
29c3be35
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
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-cli/src/main/java/org/springframework/boot/cli/command/archive/ArchiveCommand.java
View file @
29c3be35
...
...
@@ -129,9 +129,10 @@ abstract class ArchiveCommand extends OptionParsingCommand {
File
output
=
new
File
((
String
)
nonOptionArguments
.
remove
(
0
));
Assert
.
isTrue
(
output
.
getName
().
toLowerCase
(
Locale
.
ENGLISH
).
endsWith
(
"."
+
this
.
type
),
"The output '"
+
output
+
"' is not a "
+
this
.
type
.
toUpperCase
(
Locale
.
ENGLISH
)
+
" file."
);
output
.
getName
().
toLowerCase
(
Locale
.
ENGLISH
)
.
endsWith
(
"."
+
this
.
type
),
"The output '"
+
output
+
"' is not a "
+
this
.
type
.
toUpperCase
(
Locale
.
ENGLISH
)
+
" file."
);
deleteIfExists
(
output
);
GroovyCompiler
compiler
=
createCompiler
(
options
);
...
...
spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/compiler/grape/AetherGrapeEngine.java
View file @
29c3be35
...
...
@@ -324,9 +324,8 @@ public class AetherGrapeEngine implements GrapeEngine {
}
private
DependencyRequest
getDependencyRequest
(
CollectRequest
collectRequest
)
{
return
new
DependencyRequest
(
collectRequest
,
DependencyFilterUtils
.
classpathFilter
(
JavaScopes
.
COMPILE
,
JavaScopes
.
RUNTIME
));
return
new
DependencyRequest
(
collectRequest
,
DependencyFilterUtils
.
classpathFilter
(
JavaScopes
.
COMPILE
,
JavaScopes
.
RUNTIME
));
}
private
void
addManagedDependencies
(
DependencyResult
result
)
{
...
...
spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/util/ResourceUtils.java
View file @
29c3be35
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
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-devtools/src/test/java/org/springframework/boot/devtools/restart/classloader/RestartClassLoaderTests.java
View file @
29c3be35
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
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-docs/src/main/java/org/springframework/boot/docs/cloudfoundry/CloudFoundryCustomContextPathExample.java
View file @
29c3be35
...
...
@@ -48,12 +48,14 @@ public class CloudFoundryCustomContextPathExample {
return
new
TomcatServletWebServerFactory
()
{
@Override
protected
void
prepareContext
(
Host
host
,
ServletContextInitializer
[]
initializers
)
{
protected
void
prepareContext
(
Host
host
,
ServletContextInitializer
[]
initializers
)
{
super
.
prepareContext
(
host
,
initializers
);
StandardContext
child
=
new
StandardContext
();
child
.
addLifecycleListener
(
new
Tomcat
.
FixContextListener
());
child
.
setPath
(
"/cloudfoundryapplication"
);
ServletContainerInitializer
initializer
=
getServletContextInitializer
(
getContextPath
());
ServletContainerInitializer
initializer
=
getServletContextInitializer
(
getContextPath
());
child
.
addServletContainerInitializer
(
initializer
,
Collections
.
emptySet
());
child
.
setCrossContext
(
true
);
host
.
addChild
(
child
);
...
...
@@ -69,8 +71,10 @@ public class CloudFoundryCustomContextPathExample {
@Override
public
void
service
(
ServletRequest
req
,
ServletResponse
res
)
throws
ServletException
,
IOException
{
ServletContext
context
=
req
.
getServletContext
().
getContext
(
contextPath
);
context
.
getRequestDispatcher
(
"/cloudfoundryapplication"
).
forward
(
req
,
res
);
ServletContext
context
=
req
.
getServletContext
()
.
getContext
(
contextPath
);
context
.
getRequestDispatcher
(
"/cloudfoundryapplication"
).
forward
(
req
,
res
);
}
};
...
...
spring-boot-project/spring-boot-tools/spring-boot-configuration-processor/src/main/java/org/springframework/boot/configurationprocessor/MetadataStore.java
View file @
29c3be35
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
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.
...
...
@@ -95,13 +95,13 @@ public class MetadataStore {
}
private
FileObject
getMetadataResource
()
throws
IOException
{
return
this
.
environment
.
getFiler
()
.
getResource
(
StandardLocation
.
CLASS_OUTPUT
,
""
,
METADATA_PATH
);
return
this
.
environment
.
getFiler
()
.
getResource
(
StandardLocation
.
CLASS_OUTPUT
,
""
,
METADATA_PATH
);
}
private
FileObject
createMetadataResource
()
throws
IOException
{
return
this
.
environment
.
getFiler
()
.
createResource
(
StandardLocation
.
CLASS_OUTPUT
,
""
,
METADATA_PATH
);
return
this
.
environment
.
getFiler
()
.
createResource
(
StandardLocation
.
CLASS_OUTPUT
,
""
,
METADATA_PATH
);
}
private
InputStream
getAdditionalMetadataStream
()
throws
IOException
{
...
...
spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/main/java/org/springframework/boot/gradle/plugin/JavaPluginAction.java
View file @
29c3be35
...
...
@@ -140,9 +140,8 @@ final class JavaPluginAction implements PluginApplicationAction {
}
private
void
configureAdditionalMetadataLocations
(
Project
project
)
{
project
.
afterEvaluate
((
evaluated
)
->
evaluated
.
getTasks
().
withType
(
JavaCompile
.
class
,
this
::
configureAdditionalMetadataLocations
));
project
.
afterEvaluate
((
evaluated
)
->
evaluated
.
getTasks
()
.
withType
(
JavaCompile
.
class
,
this
::
configureAdditionalMetadataLocations
));
}
private
void
configureAdditionalMetadataLocations
(
JavaCompile
compile
)
{
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/main/java/org/springframework/boot/loader/tools/JarWriter.java
View file @
29c3be35
...
...
@@ -247,8 +247,8 @@ public class JarWriter implements LoaderClassesWriter, AutoCloseable {
}
/**
* Perform the actual write of a {@link JarEntry}. All other write methods
*
delegate to
this one.
* Perform the actual write of a {@link JarEntry}. All other write methods
delegate to
* this one.
* @param entry the entry to write
* @param entryWriter the entry writer or {@code null} if there is no content
* @param unpackHandler handles possible unpacking for the entry
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader-tools/src/test/java/org/springframework/boot/loader/tools/RepackagerTests.java
View file @
29c3be35
...
...
@@ -208,8 +208,7 @@ public class RepackagerTests {
repackager
.
setLayout
(
new
Layouts
.
None
());
repackager
.
repackage
(
file
,
NO_LIBRARIES
);
Manifest
actualManifest
=
getManifest
(
file
);
assertThat
(
actualManifest
.
getMainAttributes
().
getValue
(
"Main-Class"
))
.
isNull
();
assertThat
(
actualManifest
.
getMainAttributes
().
getValue
(
"Main-Class"
)).
isNull
();
assertThat
(
hasLauncherClasses
(
file
)).
isFalse
();
}
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/jar/JarFile.java
View file @
29c3be35
...
...
@@ -108,7 +108,7 @@ public class JarFile extends java.util.jar.JarFile {
private
JarFile
(
RandomAccessDataFile
rootFile
,
String
pathFromRoot
,
RandomAccessData
data
,
JarEntryFilter
filter
,
JarFileType
type
)
throws
IOException
{
throws
IOException
{
super
(
rootFile
.
getFile
());
this
.
rootFile
=
rootFile
;
this
.
pathFromRoot
=
pathFromRoot
;
...
...
spring-boot-project/spring-boot-tools/spring-boot-loader/src/main/java/org/springframework/boot/loader/util/SystemPropertyUtils.java
View file @
29c3be35
...
...
@@ -185,12 +185,13 @@ public abstract class SystemPropertyUtils {
}
if
(
propVal
==
null
)
{
// Try with underscores.
propVal
=
System
.
getenv
(
key
.
replace
(
'.'
,
'_'
));
String
name
=
key
.
replace
(
'.'
,
'_'
);
propVal
=
System
.
getenv
(
name
);
}
if
(
propVal
==
null
)
{
// Try uppercase with underscores as well.
propVal
=
System
.
getenv
(
key
.
toUpperCase
(
Locale
.
ENGLISH
)
.
replace
(
'.'
,
'_'
)
);
String
name
=
key
.
toUpperCase
(
Locale
.
ENGLISH
).
replace
(
'.'
,
'_'
);
propVal
=
System
.
getenv
(
name
);
}
if
(
propVal
!=
null
)
{
return
propVal
;
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/liquibase/SpringPackageScanClassResolver.java
View file @
29c3be35
/*
* Copyright 2012-201
7
the original author or authors.
* Copyright 2012-201
8
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/src/main/java/org/springframework/boot/util/LambdaSafe.java
View file @
29c3be35
...
...
@@ -110,7 +110,7 @@ public final class LambdaSafe {
private
Log
logger
;
private
Filter
<
C
,
A
>
filter
=
new
GenericTypeFilter
<
C
,
A
>();
private
Filter
<
C
,
A
>
filter
=
new
GenericTypeFilter
<>();
protected
LambdaSafeCallback
(
Class
<
C
>
callbackType
,
A
argument
,
Object
[]
additionalArguments
)
{
...
...
@@ -414,7 +414,7 @@ public final class LambdaSafe {
* @return an {@link InvocationResult}
*/
public
static
<
R
>
InvocationResult
<
R
>
of
(
R
value
)
{
return
new
InvocationResult
<
R
>(
value
);
return
new
InvocationResult
<>(
value
);
}
/**
...
...
spring-boot-samples/spring-boot-sample-ant/src/test/java/sample/ant/SampleAntApplicationIT.java
View file @
29c3be35
/*
* Copyright 2012-201
6
the original author or authors.
* Copyright 2012-201
8
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.
...
...
@@ -47,10 +47,12 @@ public class SampleAntApplicationIT {
});
assertThat
(
jarFiles
).
hasSize
(
1
);
Process
process
=
new
JavaExecutable
().
processBuilder
(
"-jar"
,
jarFiles
[
0
].
getName
()).
directory
(
target
).
start
();
Process
process
=
new
JavaExecutable
().
processBuilder
(
"-jar"
,
jarFiles
[
0
]
.
getName
()).
directory
(
target
).
start
();
process
.
waitFor
(
5
,
TimeUnit
.
MINUTES
);
assertThat
(
process
.
exitValue
()).
isEqualTo
(
0
);
String
output
=
FileCopyUtils
.
copyToString
(
new
InputStreamReader
(
process
.
getInputStream
()));
String
output
=
FileCopyUtils
.
copyToString
(
new
InputStreamReader
(
process
.
getInputStream
()));
assertThat
(
output
).
contains
(
"Spring Boot Ant Example"
);
}
...
...
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