Spring Data Mongo Repository:: Common shared method across all Repo issue

后端 未结 2 432
轮回少年
轮回少年 2020-12-16 06:34

Use Case

I am trying to use Adding custom behaviour to all repositories functionality of Spring Data MongoDB.

The documentation unh

2条回答
  •  离开以前
    2020-12-16 07:00

    Somewhat delayed but here is sample code that does this for a Spring web app project. The salient points are:

    1. Interface used in Controller
    2. Implementation done in a separate class that inherits from a base
    3. The base implementation provides common methods that any other Controller can use with just a quick inheritance

提交回复
热议问题