Skip to content

Fix example 87 in Spring's R2dbc reference documentation  #1318

@jsattler

Description

@jsattler

The "Example 87. @configuration class to configure R2DBC mapping support" contains the following example, which seems to be wrong:

...
@Override
protected List<Object> getCustomConverters() {

  List<Converter<?, ?>> converterList = new ArrayList<Converter<?, ?>>();
  converterList.add(new org.springframework.data.r2dbc.test.PersonReadConverter());
  converterList.add(new org.springframework.data.r2dbc.test.PersonWriteConverter());
  return converterList;
}

Results in:

  • Required type: List<Object>
  • Provided type: List<Converter<?,?>>

While looking at this example, I was also wondering why we cannot inject the Converters instead of creating them within the getCustomConverters() method.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions