Skip to content

Commit d286e99

Browse files
authored
Merge pull request #23 from bobocode-projects/spring_mvc_fix_typo_in_java_doc
Fix javadoc and typos
2 parents ebb2b29 + b100179 commit d286e99

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

3-0-spring-framework/3-0-1-hello-spring-mvc/src/main/java/com/bobocode/mvc/api/NoteRestController.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
* This controller provides a very simple REST API for Notes. It implements two endpoints that allow you to add
88
* a new note and get all notes.
99
* <p>
10-
* The base URL is `/api/notes/`. It accepts HTTP GET request to get all notes, and POST request to add a new note.
10+
* The base URL is `/api/notes`. It accepts HTTP GET request to get all notes, and POST request to add a new note.
1111
* <p>
1212
* Both methods work with content type JSON. The endpoint that returns all notes does not require any input parameters,
1313
* while the one that adds a new note accepts a JSON with a new note fields in the request body. In order to get or
1414
* add a note, just use a provided {@link Notes} field as a storage.
1515
* <p>
1616
* This controller can only be used by a separate front-end application, since it provides only data and no UI. It shows
1717
* how Spring MVC is used nowadays to build enterprise web application that have separate front-end. But initially
18-
* Spring MVC was used to build the whole application including front-end. So the controllers were connected to views
18+
* Spring MVC was used to build the whole application including front-end. So the controllers were connected to the views
1919
* via models, like in {@link com.bobocode.mvc.controller.NoteController}
2020
*/
2121
@RequiredArgsConstructor

3-0-spring-framework/3-0-1-hello-spring-mvc/src/main/java/com/bobocode/mvc/controller/NoteController.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@
99
* (YOU DON'T NEED TO KNOW IT). And the purpose of the controller is to power that UI and wire it to the storage that
1010
* is already provided as a field of class {@link Notes}. The base URL is `/notes`.
1111
* <p>
12-
* This controller handles the HTTP GET request that should list all notes. It order to do that, it fetches the list
12+
* This controller handles the HTTP GET request that should list all notes. In order to do that, it fetches the list
1313
* of notes, adds that list as an attribute to the {@link org.springframework.ui.Model}, and returns a corresponding view.
1414
* The view (which is Thymeleaf HTML template) expects to receive an attribute called `noteList`.
1515
* In classical Spring MVC, controller methods return a string value which stores a view name.
16-
* A {@link org.springframework.web.servlet.ViewResolver} is already configured to look for a HTML template in
17-
* `/resources/templates`. So the method should just return a html file name without `.html`.
16+
* A {@link org.springframework.web.servlet.ViewResolver} is already configured to look for an HTML template in
17+
* `/resources/templates`. So the method should just return an HTML file name without `.html`.
1818
* <p>
1919
* In order to add a new note, this controller handles HTTP POST request that is sent by HTML form. After submitting,
2020
* the request will have to POST parameters called `title` and `text` accordingly. So this controller retrieves those
21-
* params from he request and use them in order to create and add a new note. Once a new note is added, it redirects the
21+
* params from the request and use them in order to create and add a new note. Once a new note is added, it redirects the
2222
* request to the notes page.
2323
* <p>
2424
* Such controllers are used when both back-end and the UI are provided by the same Spring MVC application. In reality,
2525
* most application that have a rich and powerful UI, are not built like that. They have separate front-end and
26-
* back-end applications. The the back-end app, will only need to provide data and don't care about view. In that case
26+
* back-end applications. The back-end app, will only need to provide data and don't care about view. In that case
2727
* the same controller will look like {@link com.bobocode.mvc.api.NoteRestController}
2828
*/
2929
@RequiredArgsConstructor

0 commit comments

Comments
 (0)