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");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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
...
@@ -95,7 +95,7 @@ public class ControllerEndpointHandlerMapping extends RequestMappingHandlerMappi
ExposableControllerEndpoint
endpoint
,
RequestMappingInfo
mapping
)
{
ExposableControllerEndpoint
endpoint
,
RequestMappingInfo
mapping
)
{
Set
<
PathPattern
>
patterns
=
mapping
.
getPatternsCondition
().
getPatterns
();
Set
<
PathPattern
>
patterns
=
mapping
.
getPatternsCondition
().
getPatterns
();
if
(
patterns
.
isEmpty
())
{
if
(
patterns
.
isEmpty
())
{
patterns
=
new
HashSet
<
PathPattern
>(
patterns
=
new
HashSet
<>(
Arrays
.
asList
(
getPathPatternParser
().
parse
(
""
)));
Arrays
.
asList
(
getPathPatternParser
().
parse
(
""
)));
}
}
PathPattern
[]
endpointMappedPatterns
=
patterns
.
stream
()
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 {
...
@@ -77,7 +77,7 @@ final class TraceableHttpServletRequest implements TraceableRequest {
}
}
private
List
<
String
>
toList
(
Enumeration
<
String
>
enumeration
)
{
private
List
<
String
>
toList
(
Enumeration
<
String
>
enumeration
)
{
List
<
String
>
list
=
new
ArrayList
<
String
>();
List
<
String
>
list
=
new
ArrayList
<>();
while
(
enumeration
.
hasMoreElements
())
{
while
(
enumeration
.
hasMoreElements
())
{
list
.
add
(
enumeration
.
nextElement
());
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 {
...
@@ -358,8 +358,7 @@ public final class ConditionMessage {
* @return a built {@link ConditionMessage}
* @return a built {@link ConditionMessage}
*/
*/
public
ConditionMessage
items
(
Style
style
,
Object
...
items
)
{
public
ConditionMessage
items
(
Style
style
,
Object
...
items
)
{
return
items
(
style
,
return
items
(
style
,
items
==
null
?
null
:
Arrays
.
asList
(
items
));
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");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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 {
...
@@ -250,11 +250,11 @@ public class SessionAutoConfiguration {
if
(
storeType
!=
StoreType
.
NONE
if
(
storeType
!=
StoreType
.
NONE
&&
this
.
sessionRepositoryProvider
.
getIfAvailable
()
==
null
)
{
&&
this
.
sessionRepositoryProvider
.
getIfAvailable
()
==
null
)
{
if
(
storeType
!=
null
)
{
if
(
storeType
!=
null
)
{
throw
new
SessionRepositoryUnavailableException
(
"No session "
throw
new
SessionRepositoryUnavailableException
(
+
"
repository could be auto-configured, check your "
"No session
repository could be auto-configured, check your "
+
"configuration (session store type is '"
+
"configuration (session store type is '"
+
storeType
.
name
().
toLowerCase
(
Locale
.
ENGLISH
)
+
storeType
.
name
().
toLowerCase
(
Locale
.
ENGLISH
)
+
"')"
,
+
"')"
,
storeType
);
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");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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 {
...
@@ -86,18 +86,14 @@ public class MessageSourceAutoConfigurationTests {
@Test
@Test
public
void
testCacheDurationNoUnit
()
{
public
void
testCacheDurationNoUnit
()
{
this
.
contextRunner
this
.
contextRunner
.
withPropertyValues
(
"spring.messages.basename:test/messages"
,
.
withPropertyValues
(
"spring.messages.basename:test/messages"
,
"spring.messages.cache-duration=10"
).
run
(
assertCache
(
10
*
1000
));
"spring.messages.cache-duration=10"
)
.
run
(
assertCache
(
10
*
1000
));
}
}
@Test
@Test
public
void
testCacheDurationWithUnit
()
{
public
void
testCacheDurationWithUnit
()
{
this
.
contextRunner
this
.
contextRunner
.
withPropertyValues
(
"spring.messages.basename:test/messages"
,
.
withPropertyValues
(
"spring.messages.basename:test/messages"
,
"spring.messages.cache-duration=1m"
).
run
(
assertCache
(
60
*
1000
));
"spring.messages.cache-duration=1m"
)
.
run
(
assertCache
(
60
*
1000
));
}
}
private
ContextConsumer
<
AssertableApplicationContext
>
assertCache
(
long
expected
)
{
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 {
...
@@ -47,7 +47,8 @@ public class RedisAutoConfigurationJedisTests {
@Test
@Test
public
void
testOverrideRedisConfiguration
()
{
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
)
->
{
.
run
((
context
)
->
{
JedisConnectionFactory
cf
=
context
JedisConnectionFactory
cf
=
context
.
getBean
(
JedisConnectionFactory
.
class
);
.
getBean
(
JedisConnectionFactory
.
class
);
...
@@ -60,10 +61,12 @@ public class RedisAutoConfigurationJedisTests {
...
@@ -60,10 +61,12 @@ public class RedisAutoConfigurationJedisTests {
@Test
@Test
public
void
testCustomizeRedisConfiguration
()
{
public
void
testCustomizeRedisConfiguration
()
{
this
.
contextRunner
.
withUserConfiguration
(
CustomConfiguration
.
class
).
run
((
context
)
->
{
this
.
contextRunner
.
withUserConfiguration
(
CustomConfiguration
.
class
)
JedisConnectionFactory
cf
=
context
.
getBean
(
JedisConnectionFactory
.
class
);
.
run
((
context
)
->
{
assertThat
(
cf
.
isUseSsl
()).
isTrue
();
JedisConnectionFactory
cf
=
context
});
.
getBean
(
JedisConnectionFactory
.
class
);
assertThat
(
cf
.
isUseSsl
()).
isTrue
();
});
}
}
@Test
@Test
...
@@ -99,7 +102,8 @@ public class RedisAutoConfigurationJedisTests {
...
@@ -99,7 +102,8 @@ public class RedisAutoConfigurationJedisTests {
@Test
@Test
public
void
testPasswordInUrlWithColon
()
{
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
)
->
{
.
run
((
context
)
->
{
assertThat
(
assertThat
(
context
.
getBean
(
JedisConnectionFactory
.
class
).
getHostName
())
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 {
...
@@ -72,8 +72,8 @@ public class MustacheAutoConfigurationReactiveIntegrationTests {
}
}
@Configuration
@Configuration
@Import
({
ReactiveWebServerFactoryAutoConfiguration
.
class
,
WebFluxAutoConfiguration
.
class
,
@Import
({
ReactiveWebServerFactoryAutoConfiguration
.
class
,
HttpHandlerAutoConfiguration
.
class
,
WebFluxAutoConfiguration
.
class
,
HttpHandlerAutoConfiguration
.
class
,
PropertyPlaceholderAutoConfiguration
.
class
})
PropertyPlaceholderAutoConfiguration
.
class
})
@Controller
@Controller
public
static
class
Application
{
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 {
...
@@ -42,8 +42,7 @@ public class ReactiveWebServerFactoryCustomizerTests {
@Before
@Before
public
void
setup
()
{
public
void
setup
()
{
this
.
customizer
=
new
ReactiveWebServerFactoryCustomizer
(
this
.
customizer
=
new
ReactiveWebServerFactoryCustomizer
(
this
.
properties
);
this
.
properties
);
}
}
@Test
@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 {
...
@@ -62,8 +62,7 @@ public class ServletWebServerFactoryCustomizerTests {
@Before
@Before
public
void
setup
()
{
public
void
setup
()
{
MockitoAnnotations
.
initMocks
(
this
);
MockitoAnnotations
.
initMocks
(
this
);
this
.
customizer
=
new
ServletWebServerFactoryCustomizer
(
this
.
customizer
=
new
ServletWebServerFactoryCustomizer
(
this
.
properties
);
this
.
properties
);
}
}
@Test
@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");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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 {
...
@@ -129,9 +129,10 @@ abstract class ArchiveCommand extends OptionParsingCommand {
File
output
=
new
File
((
String
)
nonOptionArguments
.
remove
(
0
));
File
output
=
new
File
((
String
)
nonOptionArguments
.
remove
(
0
));
Assert
.
isTrue
(
Assert
.
isTrue
(
output
.
getName
().
toLowerCase
(
Locale
.
ENGLISH
).
endsWith
(
"."
+
this
.
type
),
output
.
getName
().
toLowerCase
(
Locale
.
ENGLISH
)
"The output '"
+
output
+
"' is not a "
+
this
.
type
.
toUpperCase
(
.
endsWith
(
"."
+
this
.
type
),
Locale
.
ENGLISH
)
+
" file."
);
"The output '"
+
output
+
"' is not a "
+
this
.
type
.
toUpperCase
(
Locale
.
ENGLISH
)
+
" file."
);
deleteIfExists
(
output
);
deleteIfExists
(
output
);
GroovyCompiler
compiler
=
createCompiler
(
options
);
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 {
...
@@ -324,9 +324,8 @@ public class AetherGrapeEngine implements GrapeEngine {
}
}
private
DependencyRequest
getDependencyRequest
(
CollectRequest
collectRequest
)
{
private
DependencyRequest
getDependencyRequest
(
CollectRequest
collectRequest
)
{
return
new
DependencyRequest
(
collectRequest
,
return
new
DependencyRequest
(
collectRequest
,
DependencyFilterUtils
DependencyFilterUtils
.
classpathFilter
(
JavaScopes
.
COMPILE
,
.
classpathFilter
(
JavaScopes
.
COMPILE
,
JavaScopes
.
RUNTIME
));
JavaScopes
.
RUNTIME
));
}
}
private
void
addManagedDependencies
(
DependencyResult
result
)
{
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");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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 {
...
@@ -48,12 +48,14 @@ public class CloudFoundryCustomContextPathExample {
return
new
TomcatServletWebServerFactory
()
{
return
new
TomcatServletWebServerFactory
()
{
@Override
@Override
protected
void
prepareContext
(
Host
host
,
ServletContextInitializer
[]
initializers
)
{
protected
void
prepareContext
(
Host
host
,
ServletContextInitializer
[]
initializers
)
{
super
.
prepareContext
(
host
,
initializers
);
super
.
prepareContext
(
host
,
initializers
);
StandardContext
child
=
new
StandardContext
();
StandardContext
child
=
new
StandardContext
();
child
.
addLifecycleListener
(
new
Tomcat
.
FixContextListener
());
child
.
addLifecycleListener
(
new
Tomcat
.
FixContextListener
());
child
.
setPath
(
"/cloudfoundryapplication"
);
child
.
setPath
(
"/cloudfoundryapplication"
);
ServletContainerInitializer
initializer
=
getServletContextInitializer
(
getContextPath
());
ServletContainerInitializer
initializer
=
getServletContextInitializer
(
getContextPath
());
child
.
addServletContainerInitializer
(
initializer
,
Collections
.
emptySet
());
child
.
addServletContainerInitializer
(
initializer
,
Collections
.
emptySet
());
child
.
setCrossContext
(
true
);
child
.
setCrossContext
(
true
);
host
.
addChild
(
child
);
host
.
addChild
(
child
);
...
@@ -69,8 +71,10 @@ public class CloudFoundryCustomContextPathExample {
...
@@ -69,8 +71,10 @@ public class CloudFoundryCustomContextPathExample {
@Override
@Override
public
void
service
(
ServletRequest
req
,
ServletResponse
res
)
public
void
service
(
ServletRequest
req
,
ServletResponse
res
)
throws
ServletException
,
IOException
{
throws
ServletException
,
IOException
{
ServletContext
context
=
req
.
getServletContext
().
getContext
(
contextPath
);
ServletContext
context
=
req
.
getServletContext
()
context
.
getRequestDispatcher
(
"/cloudfoundryapplication"
).
forward
(
req
,
res
);
.
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");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -95,13 +95,13 @@ public class MetadataStore {
...
@@ -95,13 +95,13 @@ public class MetadataStore {
}
}
private
FileObject
getMetadataResource
()
throws
IOException
{
private
FileObject
getMetadataResource
()
throws
IOException
{
return
this
.
environment
.
getFiler
()
return
this
.
environment
.
getFiler
()
.
getResource
(
StandardLocation
.
CLASS_OUTPUT
,
""
,
.
getResource
(
StandardLocation
.
CLASS_OUTPUT
,
""
,
METADATA_PATH
);
METADATA_PATH
);
}
}
private
FileObject
createMetadataResource
()
throws
IOException
{
private
FileObject
createMetadataResource
()
throws
IOException
{
return
this
.
environment
.
getFiler
()
return
this
.
environment
.
getFiler
()
.
createResource
(
StandardLocation
.
CLASS_OUTPUT
,
.
createResource
(
StandardLocation
.
CLASS_OUTPUT
,
""
,
METADATA_PATH
);
""
,
METADATA_PATH
);
}
}
private
InputStream
getAdditionalMetadataStream
()
throws
IOException
{
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 {
...
@@ -140,9 +140,8 @@ final class JavaPluginAction implements PluginApplicationAction {
}
}
private
void
configureAdditionalMetadataLocations
(
Project
project
)
{
private
void
configureAdditionalMetadataLocations
(
Project
project
)
{
project
.
afterEvaluate
((
evaluated
)
->
project
.
afterEvaluate
((
evaluated
)
->
evaluated
.
getTasks
()
evaluated
.
getTasks
().
withType
(
JavaCompile
.
class
,
.
withType
(
JavaCompile
.
class
,
this
::
configureAdditionalMetadataLocations
));
this
::
configureAdditionalMetadataLocations
));
}
}
private
void
configureAdditionalMetadataLocations
(
JavaCompile
compile
)
{
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 {
...
@@ -247,8 +247,8 @@ public class JarWriter implements LoaderClassesWriter, AutoCloseable {
}
}
/**
/**
* Perform the actual write of a {@link JarEntry}. All other write methods
* Perform the actual write of a {@link JarEntry}. All other write methods
delegate to
*
delegate to
this one.
* this one.
* @param entry the entry to write
* @param entry the entry to write
* @param entryWriter the entry writer or {@code null} if there is no content
* @param entryWriter the entry writer or {@code null} if there is no content
* @param unpackHandler handles possible unpacking for the entry
* @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 {
...
@@ -208,8 +208,7 @@ public class RepackagerTests {
repackager
.
setLayout
(
new
Layouts
.
None
());
repackager
.
setLayout
(
new
Layouts
.
None
());
repackager
.
repackage
(
file
,
NO_LIBRARIES
);
repackager
.
repackage
(
file
,
NO_LIBRARIES
);
Manifest
actualManifest
=
getManifest
(
file
);
Manifest
actualManifest
=
getManifest
(
file
);
assertThat
(
actualManifest
.
getMainAttributes
().
getValue
(
"Main-Class"
))
assertThat
(
actualManifest
.
getMainAttributes
().
getValue
(
"Main-Class"
)).
isNull
();
.
isNull
();
assertThat
(
hasLauncherClasses
(
file
)).
isFalse
();
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 {
...
@@ -108,7 +108,7 @@ public class JarFile extends java.util.jar.JarFile {
private
JarFile
(
RandomAccessDataFile
rootFile
,
String
pathFromRoot
,
private
JarFile
(
RandomAccessDataFile
rootFile
,
String
pathFromRoot
,
RandomAccessData
data
,
JarEntryFilter
filter
,
JarFileType
type
)
RandomAccessData
data
,
JarEntryFilter
filter
,
JarFileType
type
)
throws
IOException
{
throws
IOException
{
super
(
rootFile
.
getFile
());
super
(
rootFile
.
getFile
());
this
.
rootFile
=
rootFile
;
this
.
rootFile
=
rootFile
;
this
.
pathFromRoot
=
pathFromRoot
;
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 {
...
@@ -185,12 +185,13 @@ public abstract class SystemPropertyUtils {
}
}
if
(
propVal
==
null
)
{
if
(
propVal
==
null
)
{
// Try with underscores.
// Try with underscores.
propVal
=
System
.
getenv
(
key
.
replace
(
'.'
,
'_'
));
String
name
=
key
.
replace
(
'.'
,
'_'
);
propVal
=
System
.
getenv
(
name
);
}
}
if
(
propVal
==
null
)
{
if
(
propVal
==
null
)
{
// Try uppercase with underscores as well.
// Try uppercase with underscores as well.
propVal
=
System
.
getenv
(
key
.
toUpperCase
(
Locale
.
ENGLISH
)
String
name
=
key
.
toUpperCase
(
Locale
.
ENGLISH
).
replace
(
'.'
,
'_'
);
.
replace
(
'.'
,
'_'
)
);
propVal
=
System
.
getenv
(
name
);
}
}
if
(
propVal
!=
null
)
{
if
(
propVal
!=
null
)
{
return
propVal
;
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");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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 {
...
@@ -110,7 +110,7 @@ public final class LambdaSafe {
private
Log
logger
;
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
,
protected
LambdaSafeCallback
(
Class
<
C
>
callbackType
,
A
argument
,
Object
[]
additionalArguments
)
{
Object
[]
additionalArguments
)
{
...
@@ -414,7 +414,7 @@ public final class LambdaSafe {
...
@@ -414,7 +414,7 @@ public final class LambdaSafe {
* @return an {@link InvocationResult}
* @return an {@link InvocationResult}
*/
*/
public
static
<
R
>
InvocationResult
<
R
>
of
(
R
value
)
{
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");
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* you may not use this file except in compliance with the License.
...
@@ -47,10 +47,12 @@ public class SampleAntApplicationIT {
...
@@ -47,10 +47,12 @@ public class SampleAntApplicationIT {
});
});
assertThat
(
jarFiles
).
hasSize
(
1
);
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
);
process
.
waitFor
(
5
,
TimeUnit
.
MINUTES
);
assertThat
(
process
.
exitValue
()).
isEqualTo
(
0
);
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"
);
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