Skip to content

Commit a711152

Browse files
Add asciidoc for new Conversion Service Bean Name feature
1 parent ecc27c8 commit a711152

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

docs/src/docs/asciidoc/chapter-3-mapper-as-converter.asciidoc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,19 @@ public interface MapperSpringConfig {
9797
}
9898
----
9999
====
100+
[[customConversionService]]
101+
=== Specifying The Conversion Service Bean Name
102+
If your application has multiple `ConversionService` beans, you will need to specify the bean name. The `SpringMapperConfig` allows you to specify it using the `conversionServiceBeanName` property.
103+
====
104+
[source, java, linenums]
105+
[subs="verbatim,attributes"]
106+
----
107+
import org.mapstruct.MapperConfig;
108+
import org.mapstruct.extensions.spring.SpringMapperConfig;
109+
110+
@MapperConfig(componentModel = "spring", uses = ConversionServiceAdapter.class)
111+
@SpringMapperConfig(conversionServiceBeanName = "myConversionService")
112+
public interface MapperSpringConfig {
113+
}
114+
----
115+
====

0 commit comments

Comments
 (0)