antonarhipov
07/07/2022, 12:39 PMkenkyee
07/07/2022, 12:40 PMTh version of Kotlin to use
antonarhipov
07/07/2022, 12:56 PMSpring Boot 2.x requires Kotlin 1.3+
Spring Boot 3.x requires Kotlin 1.7+
not sure about putting jdbctemplate access in the Service layer...I thought it belonged in the Repository layer?Did you mean Spring Data repository (covered later in the tutorial)? Using jdbctemplate from a service is what Josh Long does every time - I can’t fight that 😅
also not sure it’s worth mentioning, but if you use the Hibernate ORM DB layer, you should not use data classes because it breaks HibernateOh yes, we have a full webinar about that. I think this will be linked from this tutorial as a follow-up to learn after the basics
kenkyee
07/07/2022, 1:00 PMDid you mean Spring Data repository (covered later in the tutorial)? Using jdbctemplate from a service is what Josh Long does every time - I can’t fight that 😅lol...I've been ignoring that part of Josh's suggestions 🙂
I asked the Spring Team about the versions and the official view on it is this:
> Spring Boot 2.x requires Kotlin 1.3+
> Spring Boot 3.x requires Kotlin 1.7+Yep...it's just something folks might not be aware of....that Spring's Kotlin support for the latest minor point release does lag quite a bit.
antonarhipov
07/07/2022, 1:03 PMPoisonedYouth
07/07/2022, 6:44 PMantonarhipov
07/07/2022, 8:37 PMPoisonedYouth
07/08/2022, 5:17 AMAnastasia Rozovskaya
07/08/2022, 2:03 PMto be
here) -> “Packages and classes that belong to the application are under the main/kotlin folder” || “There are packages and classes under the main/kotlin folder that belong to the application.” || “Packages and classes that belong to the application can be found under the main/kotlin folder”
2. [p.6: Nit.] kotlin(“jvm”) -The plugin defines the version of Kotlin to be used in the project (The
could be changed to This
, if you feel that way). Also check other similar places.
3. [p.6: Nit.] You use `dependencies block` and _dependencies_ section
on the same page referring to the same thing. It might be better to stick with single naming.
4. [p.7: Nit.] The annotation enables Spring Boot’s auto-configuration, component scan and be able to define extra configuration on their “application class”. -> … and the ability to define extra configuration ...
5. [p.8: Nit.] Hence, if we access the application at the root (“/”) and supply a request parameter called “name” the parameter value will be used as an argument for invoking the index function. (add one ,
) -> … called “name”*,* the parameter value …
6. [p.11] This is a factory function to create an read-only list of objects. (change an
to a
) -> … to create a read-only list …
7. [p.10] This is probably too specific, but you can point out that when we change MessageResource controller to return a list of Message objects, we do not provide any parameters for index()
function anymore.
8. There are multiple times, when a sentence starts with Hence
, but I can’t figure out why sometimes you put ,
after this word, and sometimes you don’t.
9. [p.13] fun save(message: Message){
<- formatting (space between )
and {
is missing)
10. [p. 15] [Elvis operator (If-not-null-else shorthand )](null-safety.md#elvis-operator) looks like a wrongly formatted link
11. [p. 18] Create the requests.http file -> add explanation where in a project hierarchy one should create this file like “Create the requests.http file under your project directory, see an image below the following code”
12. [p. 19] curl -X POST --location “http://localhost:8080” -H “Content-Type: application/json” -d “{ \“text\“: \“Hello!\” }” Here is a typo, you should also escape !
or the request would not work, so the correct command wouls be -> curl -X POST --location “http://localhost:8080” -H “Content-Type: application/json” -d “{ \“text\“: \“Hello\!\” }”
13. [p. 20] fun findMessageById(id: String): List<Message>
return list of messages, so naming could be more accurate like getMessagesById
14. [p. 22] For that, we need to unwrap the Optional
value is it’s present, and return a list with the value. <- this sentence is difficult to parse at “unwrap the Optional
value is it’s present”.
15. [p. 22] Fix link “This can be implemented as an [extension function](extensions.md#extension-functions) to the`Optional` type.”
16. [p. 23] The same
17. [p. 23] CrudRepository’ save() function (I presume there is a missing s
) -> CrudRepository’*s*
18. [p. 23] This is what the id
property should be declared using the var
keyword. (what -> why) -> This is why the id
property should be declared using the var
keyword.
19. [p. 23] we can use the RANDON_UUID()
(typo in random) -> we can use the RANDOM_UUID()
antonarhipov
07/09/2022, 6:05 AMPoisonedYouth
07/09/2022, 6:17 AMantonarhipov
07/09/2022, 6:22 AMPoisonedYouth
07/09/2022, 6:40 AM