Spring boot : 2.5.4 Java : 16

What

Please make a function available like @ Id Annotation

Why ?

I want to "bind" mongodb with my endpoints. on my app it works well, but it's annoying only because of the only way to convert Id is annotation (@ Id).

So my goal is to make 0 Mongo's classMapping. (it's not "mapping" but "binding", document is good for store anything right ?).

My API works well however i have this extract from Users endpoint (GET_ALL_USERS - no transformation at all)

[
    {
        "_id": { "timestamp": 1632668571, "date": "2021-09-26T15:02:51.000+00:00" },
         ...

    }
]

but expect have the string id ( User's ObjectId in mongodb Atlas)

SpringBoot [Mongo-Spring] Enhancement make @Id annotation be also a function or make it easier

Maybe I will make a class for this only purpose [converting an id correctly] (that's lamefull or too weird) .

if there is possibilities for returning "61508b9b7f70af73a7425f8a" like mongoose (javascript) it would be a lot easier. if someone want make query on date, then providing function ... no ?

Comment From: wilkinsona

Integration between Spring and MongoDB is provided by Spring Data MongoDB which is managed as a separate project. If you'd like to pursue this, please open an issue over there.