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
be7c0a15
Commit
be7c0a15
authored
Jan 23, 2018
by
Brian Clozel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move reactive ErrorAttributes into spring-boot
Closes gh-11714
parent
674be068
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
73 additions
and
7 deletions
+73
-7
AbstractErrorWebExceptionHandler.java
.../web/reactive/error/AbstractErrorWebExceptionHandler.java
+2
-0
DefaultErrorWebExceptionHandler.java
...e/web/reactive/error/DefaultErrorWebExceptionHandler.java
+1
-0
ErrorWebFluxAutoConfiguration.java
...ure/web/reactive/error/ErrorWebFluxAutoConfiguration.java
+3
-0
DefaultErrorAttributes.java
...ework/boot/web/reactive/error/DefaultErrorAttributes.java
+1
-1
ErrorAttributes.java
...ingframework/boot/web/reactive/error/ErrorAttributes.java
+2
-2
ErrorWebExceptionHandler.java
...ork/boot/web/reactive/error/ErrorWebExceptionHandler.java
+2
-2
package-info.java
...springframework/boot/web/reactive/error/package-info.java
+20
-0
package-info.java
...ework/boot/web/reactive/function/client/package-info.java
+20
-0
package-info.java
.../springframework/boot/web/servlet/error/package-info.java
+20
-0
DefaultErrorAttributesTests.java
.../boot/web/reactive/error/DefaultErrorAttributesTests.java
+2
-2
No files found.
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/AbstractErrorWebExceptionHandler.java
View file @
be7c0a15
...
...
@@ -26,6 +26,8 @@ import reactor.core.publisher.Mono;
import
org.springframework.beans.factory.InitializingBean
;
import
org.springframework.boot.autoconfigure.template.TemplateAvailabilityProviders
;
import
org.springframework.boot.autoconfigure.web.ResourceProperties
;
import
org.springframework.boot.web.reactive.error.ErrorAttributes
;
import
org.springframework.boot.web.reactive.error.ErrorWebExceptionHandler
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.core.io.Resource
;
import
org.springframework.http.codec.HttpMessageReader
;
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/DefaultErrorWebExceptionHandler.java
View file @
be7c0a15
...
...
@@ -28,6 +28,7 @@ import reactor.core.publisher.Mono;
import
org.springframework.boot.autoconfigure.web.ErrorProperties
;
import
org.springframework.boot.autoconfigure.web.ResourceProperties
;
import
org.springframework.boot.web.reactive.error.ErrorAttributes
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.http.HttpStatus
;
import
org.springframework.http.MediaType
;
...
...
spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/reactive/error/ErrorWebFluxAutoConfiguration.java
View file @
be7c0a15
...
...
@@ -30,6 +30,9 @@ import org.springframework.boot.autoconfigure.web.ResourceProperties;
import
org.springframework.boot.autoconfigure.web.ServerProperties
;
import
org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.boot.web.reactive.error.DefaultErrorAttributes
;
import
org.springframework.boot.web.reactive.error.ErrorAttributes
;
import
org.springframework.boot.web.reactive.error.ErrorWebExceptionHandler
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
...
...
spring-boot-project/spring-boot
-autoconfigure/src/main/java/org/springframework/boot/autoconfigure
/web/reactive/error/DefaultErrorAttributes.java
→
spring-boot-project/spring-boot
/src/main/java/org/springframework/boot
/web/reactive/error/DefaultErrorAttributes.java
View file @
be7c0a15
...
...
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package
org
.
springframework
.
boot
.
autoconfigure
.
web
.
reactive
.
error
;
package
org
.
springframework
.
boot
.
web
.
reactive
.
error
;
import
java.io.PrintWriter
;
import
java.io.StringWriter
;
...
...
spring-boot-project/spring-boot
-autoconfigure/src/main/java/org/springframework/boot/autoconfigure
/web/reactive/error/ErrorAttributes.java
→
spring-boot-project/spring-boot
/src/main/java/org/springframework/boot
/web/reactive/error/ErrorAttributes.java
View file @
be7c0a15
/*
* 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.
...
...
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package
org
.
springframework
.
boot
.
autoconfigure
.
web
.
reactive
.
error
;
package
org
.
springframework
.
boot
.
web
.
reactive
.
error
;
import
java.util.Map
;
...
...
spring-boot-project/spring-boot
-autoconfigure/src/main/java/org/springframework/boot/autoconfigure
/web/reactive/error/ErrorWebExceptionHandler.java
→
spring-boot-project/spring-boot
/src/main/java/org/springframework/boot
/web/reactive/error/ErrorWebExceptionHandler.java
View file @
be7c0a15
/*
* 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.
...
...
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package
org
.
springframework
.
boot
.
autoconfigure
.
web
.
reactive
.
error
;
package
org
.
springframework
.
boot
.
web
.
reactive
.
error
;
import
org.springframework.web.server.WebExceptionHandler
;
...
...
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/error/package-info.java
0 → 100644
View file @
be7c0a15
/*
* Copyright 2012-2018 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Spring WebFlux error handling infrastructure.
*/
package
org
.
springframework
.
boot
.
web
.
reactive
.
error
;
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/reactive/function/client/package-info.java
0 → 100644
View file @
be7c0a15
/*
* Copyright 2012-2018 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Spring WebFlux WebClient support abstractions.
*/
package
org
.
springframework
.
boot
.
web
.
reactive
.
function
.
client
;
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/servlet/error/package-info.java
0 → 100644
View file @
be7c0a15
/*
* Copyright 2012-2018 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Spring MVC error handling infrastructure.
*/
package
org
.
springframework
.
boot
.
web
.
servlet
.
error
;
spring-boot-project/spring-boot
-autoconfigure/src/test/java/org/springframework/boot/autoconfigure
/web/reactive/error/DefaultErrorAttributesTests.java
→
spring-boot-project/spring-boot
/src/test/java/org/springframework/boot
/web/reactive/error/DefaultErrorAttributesTests.java
View file @
be7c0a15
...
...
@@ -14,7 +14,7 @@
* limitations under the License.
*/
package
org
.
springframework
.
boot
.
autoconfigure
.
web
.
reactive
.
error
;
package
org
.
springframework
.
boot
.
web
.
reactive
.
error
;
import
java.lang.reflect.Method
;
import
java.util.Collections
;
...
...
@@ -198,7 +198,7 @@ public class DefaultErrorAttributesTests {
.
getErrorAttributes
(
buildServerRequest
(
request
,
ex
),
false
);
assertThat
(
attributes
.
get
(
"message"
)).
asString
()
.
startsWith
(
"Validation failed for argument at index 0 in method: "
+
"public int org.springframework.boot.
autoconfigure.
web.reactive.error.DefaultErrorAttributesTests"
+
"public int org.springframework.boot.web.reactive.error.DefaultErrorAttributesTests"
+
".method(java.lang.String), with 1 error(s)"
);
assertThat
(
attributes
.
get
(
"errors"
)).
isEqualTo
(
bindingResult
.
getAllErrors
());
}
...
...
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