annotations, and then annotating the same @RequestMapping in controller class
Why?
The @ReqeustMapping defined in the controller overrides the one defined in Interface (like in interface). That could be the reason - if the interface is to be used by different clients, implementing different controllers. Do you have memory of the place, where you've seen this?
https://www.baeldung.com/spring-interface-driven-controllers
Yes, I referred to this also.
If you're exploring this direction, "api first approach" may also be interesting for you. It's next level of "interface driven", where interface not just java interface, but a openapi spec https://reflectoring.io/spring-boot-openapi/
It generates simple controllers for Kotlin, unlike Java where you would have interfaces and controllers
It is really great and I'm using it Although I'm struggling with MongoId representation in there Is there something neat to be done maybe?
Обсуждают сегодня