Skip to content

Commit e441832

Browse files
committed
Accept WritableResource as required dependency type as well
Closes gh-15284
1 parent f963fc5 commit e441832

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

spring-beans/src/main/java/org/springframework/beans/support/ResourceEditorRegistrar.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -43,6 +43,7 @@
4343
import org.springframework.core.io.Resource;
4444
import org.springframework.core.io.ResourceEditor;
4545
import org.springframework.core.io.ResourceLoader;
46+
import org.springframework.core.io.WritableResource;
4647
import org.springframework.core.io.support.ResourceArrayPropertyEditor;
4748
import org.springframework.core.io.support.ResourcePatternResolver;
4849

@@ -102,6 +103,7 @@ public void registerCustomEditors(PropertyEditorRegistry registry) {
102103
ResourceEditor baseEditor = new ResourceEditor(this.resourceLoader, this.propertyResolver);
103104
doRegisterEditor(registry, Resource.class, baseEditor);
104105
doRegisterEditor(registry, ContextResource.class, baseEditor);
106+
doRegisterEditor(registry, WritableResource.class, baseEditor);
105107
doRegisterEditor(registry, InputStream.class, new InputStreamEditor(baseEditor));
106108
doRegisterEditor(registry, InputSource.class, new InputSourceEditor(baseEditor));
107109
doRegisterEditor(registry, File.class, new FileEditor(baseEditor));

0 commit comments

Comments
 (0)