spring-guides/tut-rest

Several issues regarding README.adoc

rillig opened this issue · 5 comments

  • Why does the guide use RequestMapping instead of the simpler GetMapping, PostMapping, and so on?

  • Why is the L in @PathVariable Long bookmarkId an uppercase letter?

  • The first HttpMessageConverter is missing an s at the end. The one that does have an s at the end has an extra space before the s that should be removed.

  • Some of the source code is indented with 8 spaces (way too much for presenting it in a narrow column), some is indented with 4 spaces. To save even more space, it should only be indented with 2 spaces, or at least consistently with 4 spaces.

  • The text in the request message should probably be in the response message. The current text doesn't make sense to me.

asciidoc which is used to handle the documentation tabs which exist in the java source files are imported and tabs are coverted to 4 space indentation if you change [source,java] to [source,java,indent=0]. Which I've just done a pull request for #60

Can't find text in the request message in the current version.

Can't find text HttpMessageConverter in the current version.

Can't find text bookmarkId in the current version.

This tutorial was completely rewritten from scratch. The previous version moreso illustrated Spring MVC and it actually predated the @GetMapping annotations.

The new tutorial goes into more detail on RESTful concepts and how to implement them including:

  • making your POJOs more resilient to changes
  • letting your web layer support both old and new APIs without great cost to you
  • creating and maintaining hypermedia using Spring HATEOAS.

I recommend you give it a reading. And if you spot stuff there that needs mending, please let us know!