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
34de119e
Commit
34de119e
authored
Mar 16, 2017
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
698aa94c
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
17 deletions
+20
-17
EnvironmentEndpointTests.java
...ework/boot/actuate/endpoint/EnvironmentEndpointTests.java
+1
-1
HttpHandlerAutoConfiguration.java
...oconfigure/web/reactive/HttpHandlerAutoConfiguration.java
+8
-6
ResourceServerTokenServicesConfigurationTests.java
...source/ResourceServerTokenServicesConfigurationTests.java
+2
-2
HttpHandlerAutoConfigurationTests.java
...igure/web/reactive/HttpHandlerAutoConfigurationTests.java
+7
-6
InstallTests.java
...st/java/org/springframework/boot/gradle/InstallTests.java
+1
-1
ProjectCreator.java
.../java/org/springframework/boot/gradle/ProjectCreator.java
+1
-1
No files found.
spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/EnvironmentEndpointTests.java
View file @
34de119e
/*
/*
* Copyright 2012-201
6
the original author or authors.
* Copyright 2012-201
7
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-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/HttpHandlerAutoConfiguration.java
View file @
34de119e
...
@@ -38,6 +38,7 @@ import org.springframework.web.reactive.DispatcherHandler;
...
@@ -38,6 +38,7 @@ import org.springframework.web.reactive.DispatcherHandler;
import
org.springframework.web.reactive.function.server.HandlerStrategies
;
import
org.springframework.web.reactive.function.server.HandlerStrategies
;
import
org.springframework.web.reactive.function.server.RouterFunction
;
import
org.springframework.web.reactive.function.server.RouterFunction
;
import
org.springframework.web.reactive.function.server.RouterFunctions
;
import
org.springframework.web.reactive.function.server.RouterFunctions
;
import
org.springframework.web.reactive.function.server.ServerResponse
;
import
org.springframework.web.reactive.result.view.ViewResolver
;
import
org.springframework.web.reactive.result.view.ViewResolver
;
import
org.springframework.web.server.WebFilter
;
import
org.springframework.web.server.WebFilter
;
import
org.springframework.web.server.WebHandler
;
import
org.springframework.web.server.WebHandler
;
...
@@ -85,16 +86,16 @@ public class HttpHandlerAutoConfiguration {
...
@@ -85,16 +86,16 @@ public class HttpHandlerAutoConfiguration {
private
final
WebSessionManager
webSessionManager
;
private
final
WebSessionManager
webSessionManager
;
private
final
List
<
HttpMessageReader
>
messageReaders
;
private
final
List
<
HttpMessageReader
<?>
>
messageReaders
;
private
final
List
<
HttpMessageWriter
>
messageWriters
;
private
final
List
<
HttpMessageWriter
<?>
>
messageWriters
;
private
final
List
<
ViewResolver
>
viewResolvers
;
private
final
List
<
ViewResolver
>
viewResolvers
;
public
FunctionalConfig
(
ObjectProvider
<
List
<
WebFilter
>>
webFilters
,
public
FunctionalConfig
(
ObjectProvider
<
List
<
WebFilter
>>
webFilters
,
ObjectProvider
<
WebSessionManager
>
webSessionManager
,
ObjectProvider
<
WebSessionManager
>
webSessionManager
,
ObjectProvider
<
List
<
HttpMessageReader
>>
messageReaders
,
ObjectProvider
<
List
<
HttpMessageReader
<?>
>>
messageReaders
,
ObjectProvider
<
List
<
HttpMessageWriter
>>
messageWriters
,
ObjectProvider
<
List
<
HttpMessageWriter
<?>
>>
messageWriters
,
ObjectProvider
<
List
<
ViewResolver
>>
viewResolvers
)
{
ObjectProvider
<
List
<
ViewResolver
>>
viewResolvers
)
{
this
.
webFilters
=
webFilters
.
getIfAvailable
();
this
.
webFilters
=
webFilters
.
getIfAvailable
();
if
(
this
.
webFilters
!=
null
)
{
if
(
this
.
webFilters
!=
null
)
{
...
@@ -107,9 +108,10 @@ public class HttpHandlerAutoConfiguration {
...
@@ -107,9 +108,10 @@ public class HttpHandlerAutoConfiguration {
}
}
@Bean
@Bean
public
HttpHandler
httpHandler
(
List
<
RouterFunction
>
routerFunctions
)
{
public
<
T
extends
ServerResponse
>
HttpHandler
httpHandler
(
List
<
RouterFunction
<
T
>>
routerFunctions
)
{
routerFunctions
.
sort
(
new
AnnotationAwareOrderComparator
());
routerFunctions
.
sort
(
new
AnnotationAwareOrderComparator
());
RouterFunction
routerFunction
=
routerFunctions
.
stream
()
RouterFunction
<
T
>
routerFunction
=
routerFunctions
.
stream
()
.
reduce
(
RouterFunction:
:
and
).
get
();
.
reduce
(
RouterFunction:
:
and
).
get
();
HandlerStrategies
.
Builder
strategiesBuilder
=
HandlerStrategies
.
builder
();
HandlerStrategies
.
Builder
strategiesBuilder
=
HandlerStrategies
.
builder
();
if
(
this
.
messageReaders
!=
null
)
{
if
(
this
.
messageReaders
!=
null
)
{
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/oauth2/resource/ResourceServerTokenServicesConfigurationTests.java
View file @
34de119e
...
@@ -252,7 +252,7 @@ public class ResourceServerTokenServicesConfigurationTests {
...
@@ -252,7 +252,7 @@ public class ResourceServerTokenServicesConfigurationTests {
EnvironmentTestUtils
.
addEnvironment
(
this
.
environment
,
EnvironmentTestUtils
.
addEnvironment
(
this
.
environment
,
"security.oauth2.resource.jwt.key-uri=http://localhost:12345/banana"
);
"security.oauth2.resource.jwt.key-uri=http://localhost:12345/banana"
);
this
.
context
=
new
SpringApplicationBuilder
(
ResourceConfiguration
.
class
)
this
.
context
=
new
SpringApplicationBuilder
(
ResourceConfiguration
.
class
)
.
environment
(
this
.
environment
).
web
(
false
).
run
();
.
environment
(
this
.
environment
).
web
(
WebApplicationType
.
NONE
).
run
();
assertThat
(
this
.
context
.
getBeansOfType
(
JwtAccessTokenConverter
.
class
)).
hasSize
(
1
);
assertThat
(
this
.
context
.
getBeansOfType
(
JwtAccessTokenConverter
.
class
)).
hasSize
(
1
);
}
}
...
@@ -262,7 +262,7 @@ public class ResourceServerTokenServicesConfigurationTests {
...
@@ -262,7 +262,7 @@ public class ResourceServerTokenServicesConfigurationTests {
"security.oauth2.resource.jwt.key-uri=http://localhost:12345/banana"
);
"security.oauth2.resource.jwt.key-uri=http://localhost:12345/banana"
);
this
.
context
=
new
SpringApplicationBuilder
(
ResourceConfiguration
.
class
,
this
.
context
=
new
SpringApplicationBuilder
(
ResourceConfiguration
.
class
,
JwtAccessTokenConverterRestTemplateCustomizerConfiguration
.
class
)
JwtAccessTokenConverterRestTemplateCustomizerConfiguration
.
class
)
.
environment
(
this
.
environment
).
web
(
false
).
run
();
.
environment
(
this
.
environment
).
web
(
WebApplicationType
.
NONE
).
run
();
JwtAccessTokenConverterRestTemplateCustomizer
customizer
=
this
.
context
JwtAccessTokenConverterRestTemplateCustomizer
customizer
=
this
.
context
.
getBean
(
JwtAccessTokenConverterRestTemplateCustomizer
.
class
);
.
getBean
(
JwtAccessTokenConverterRestTemplateCustomizer
.
class
);
verify
(
customizer
).
customize
(
any
(
RestTemplate
.
class
));
verify
(
customizer
).
customize
(
any
(
RestTemplate
.
class
));
...
...
spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/web/reactive/HttpHandlerAutoConfigurationTests.java
View file @
34de119e
...
@@ -31,6 +31,7 @@ import org.springframework.http.server.reactive.HttpHandler;
...
@@ -31,6 +31,7 @@ import org.springframework.http.server.reactive.HttpHandler;
import
org.springframework.web.reactive.function.server.RequestPredicates
;
import
org.springframework.web.reactive.function.server.RequestPredicates
;
import
org.springframework.web.reactive.function.server.RouterFunction
;
import
org.springframework.web.reactive.function.server.RouterFunction
;
import
org.springframework.web.reactive.function.server.RouterFunctions
;
import
org.springframework.web.reactive.function.server.RouterFunctions
;
import
org.springframework.web.reactive.function.server.ServerResponse
;
import
org.springframework.web.server.WebFilter
;
import
org.springframework.web.server.WebFilter
;
import
org.springframework.web.server.WebHandler
;
import
org.springframework.web.server.WebHandler
;
import
org.springframework.web.server.handler.FilteringWebHandler
;
import
org.springframework.web.server.handler.FilteringWebHandler
;
...
@@ -149,9 +150,9 @@ public class HttpHandlerAutoConfigurationTests {
...
@@ -149,9 +150,9 @@ public class HttpHandlerAutoConfigurationTests {
protected
static
class
FunctionalConfig
{
protected
static
class
FunctionalConfig
{
@Bean
@Bean
public
RouterFunction
routerFunction
()
{
public
RouterFunction
<
ServerResponse
>
routerFunction
()
{
return
RouterFunctions
.
route
(
RequestPredicates
.
GET
(
"/test"
),
return
RouterFunctions
.
route
(
RequestPredicates
.
GET
(
"/test"
),
serverRequest
->
null
);
(
serverRequest
)
->
null
);
}
}
}
}
...
@@ -160,9 +161,9 @@ public class HttpHandlerAutoConfigurationTests {
...
@@ -160,9 +161,9 @@ public class HttpHandlerAutoConfigurationTests {
protected
static
class
FunctionalConfigWithWebFilters
{
protected
static
class
FunctionalConfigWithWebFilters
{
@Bean
@Bean
public
RouterFunction
routerFunction
()
{
public
RouterFunction
<
ServerResponse
>
routerFunction
()
{
return
RouterFunctions
.
route
(
RequestPredicates
.
GET
(
"/test"
),
return
RouterFunctions
.
route
(
RequestPredicates
.
GET
(
"/test"
),
serverRequest
->
null
);
(
serverRequest
)
->
null
);
}
}
@Bean
@Bean
...
@@ -181,9 +182,9 @@ public class HttpHandlerAutoConfigurationTests {
...
@@ -181,9 +182,9 @@ public class HttpHandlerAutoConfigurationTests {
}
}
@Bean
@Bean
public
RouterFunction
routerFunction
()
{
public
RouterFunction
<
ServerResponse
>
routerFunction
()
{
return
RouterFunctions
.
route
(
RequestPredicates
.
GET
(
"/test"
),
return
RouterFunctions
.
route
(
RequestPredicates
.
GET
(
"/test"
),
serverRequest
->
null
);
(
serverRequest
)
->
null
);
}
}
}
}
...
...
spring-boot-integration-tests/spring-boot-gradle-tests/src/test/java/org/springframework/boot/gradle/InstallTests.java
View file @
34de119e
/*
/*
* Copyright 2012-201
5
the original author or authors.
* Copyright 2012-201
7
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-integration-tests/spring-boot-gradle-tests/src/test/java/org/springframework/boot/gradle/ProjectCreator.java
View file @
34de119e
/*
/*
* Copyright 2012-201
6
the original author or authors.
* Copyright 2012-201
7
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.
...
...
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