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
2f88dd73
Commit
2f88dd73
authored
Jul 03, 2019
by
Phillip Webb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Polish
parent
cd5f40ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
ValidationBindHandler.java
...ext/properties/bind/validation/ValidationBindHandler.java
+7
-7
No files found.
spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/bind/validation/ValidationBindHandler.java
View file @
2f88dd73
...
...
@@ -65,13 +65,6 @@ public class ValidationBindHandler extends AbstractBindHandler {
return
super
.
onSuccess
(
name
,
target
,
context
,
result
);
}
@Override
public
void
onFinish
(
ConfigurationPropertyName
name
,
Bindable
<?>
target
,
BindContext
context
,
Object
result
)
throws
Exception
{
validate
(
name
,
target
,
context
,
result
);
super
.
onFinish
(
name
,
target
,
context
,
result
);
}
@Override
public
Object
onFailure
(
ConfigurationPropertyName
name
,
Bindable
<?>
target
,
BindContext
context
,
Exception
error
)
throws
Exception
{
...
...
@@ -83,6 +76,13 @@ public class ValidationBindHandler extends AbstractBindHandler {
return
result
;
}
@Override
public
void
onFinish
(
ConfigurationPropertyName
name
,
Bindable
<?>
target
,
BindContext
context
,
Object
result
)
throws
Exception
{
validate
(
name
,
target
,
context
,
result
);
super
.
onFinish
(
name
,
target
,
context
,
result
);
}
private
void
validate
(
ConfigurationPropertyName
name
,
Bindable
<?>
target
,
BindContext
context
,
Object
result
)
{
Object
validationTarget
=
getValidationTarget
(
target
,
context
,
result
);
Class
<?>
validationType
=
target
.
getBoxedType
().
resolve
();
...
...
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