Skip to content

Commit 2cc8d04

Browse files
Update code snippet in documentation.
Original Pull Request: #3093
1 parent 22fa3c6 commit 2cc8d04

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/main/antora/modules/ROOT/pages/repositories/custom-implementations.adoc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ In the example above `RepositoryMethodContext.currentMethod()` is used to retrie
303303
`RepositoryMethodContext` exposes information attached to the repository such as the domain type.
304304
In this case we use the repository domain type to identify the name of the index to be searched.
305305

306-
Now that you've got both, the fragment declaration and implementation you can register it in the `META-INF/spring.factories` file, package things up if needed, and you're good to go.
306+
Now that you've got both, the fragment declaration and implementation you can register it in the `META-INF/spring.factories` file, package things up if needed, and you're almost good to go.
307307

308308
.Registering a fragment implementation through `META-INF/spring.factories`
309309
====
@@ -325,7 +325,7 @@ import org.springframework.data.repository.core.support.RepositoryFactoryBeanSup
325325
import org.springframework.lang.Nullable;
326326
327327
@Configuration
328-
class MyConfiguration implements BeanPostProcessor {
328+
class MyConfiguration {
329329
330330
@Bean
331331
static BeanPostProcessor exposeMethodMetadata() {
@@ -338,6 +338,7 @@ class MyConfiguration implements BeanPostProcessor {
338338
if(bean instanceof RepositoryFactoryBeanSupport<?,?,?> factoryBean) {
339339
factoryBean.setExposeMetadata(true);
340340
}
341+
return bean;
341342
}
342343
};
343344
}

0 commit comments

Comments
 (0)