Are there conventions for naming methods in the Restful spring boot conrtoller layer ? I am in dilemma choosing the two name - getSomeData vs fetchSomeData. Is it OK to use HTTP Verbs (get,post,put) inside controller method names?
I think the most important thing is to be consistent in all your Controllers and to be explicit about what the method is supposed to be doing. It is completely ok to use HTTP verbs in the method names, especially in regards to GET. But when you have POSTs for example, that is usually a creation of a resource, so a method called createWhateverResource instead of postWhateverResource. The important thing is to be clear and let the name of the method be self-explanatory.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With