Browse Source

session 2 - end of unit 1

master
Arthur Dambrine 3 years ago
parent
commit
4354838f6a
  1. 11
      readme.md
  2. 60
      spring-course-notes.md
  3. 95
      unit1_course_content.md
  4. 16
      unit2_building_spring_boot_webapp.md

11
readme.md

@ -2,4 +2,13 @@
**Table of content** **Table of content**
[Unit 0: course content](spring-course-notes.md) - [Unit 1: course content](unit1_course_content.md)
- Unit 2: Building a Spring Boot Web App
### Log sessions
Session 1 - 26/10/2022 - stoped reading [@here](https://sparkers.udemy.com/course/spring-framework-5-beginner-to-guru/learn/lecture/7577382#overview)
Session 2 - 27/10/2022 - finished unit 1

60
spring-course-notes.md

@ -1,60 +0,0 @@
# Spring 5 course : Udemy
[toc]
## Log sessions
Session 1 - 26/10/2022 - stoped reading [@here](https://sparkers.udemy.com/course/spring-framework-5-beginner-to-guru/learn/lecture/7577382#overview)
Session 2 - 27/10/2022 - ?
## Unit 0: course content
### Getting the most of the course
- download the github repo and use git diff on branches (start of the course / end of the course)
- fork the repositories to my own github account and start from the fork to follow the course and commit to my personal Github acc.
- Spring Boot Cookbook at the end of the course
### Setting up the dev env for Spring
- Jdk 8 or higher (I will use 17)
- Maven 3.25 of higher (I will use 3.8.6)
- Gradle 3.41. or higher (I will use 7.5.1)
- *use maven or gradle as you prefer*
```
#check java is installed
java -version
#check JDK is installed
javac -version
#verify maven is installed
mvn -v
#verify gradle is installed
gradle -v
```
### What's new in Spring Famework 5?
#### Core Framework Revision
- what is reflextion in java?
**Tips:** @Nullable and @NotNull annotations to explicitly mark nullable arguments and return values. This enables dealing null values at compile time rather than throwing NullPointerExceptions at runtime.
Session 1 - 26/10/2022 - stoped reading [@here](https://sparkers.udemy.com/course/spring-framework-5-beginner-to-guru/learn/lecture/7577382#overview)
<hr>

95
unit1_course_content.md

@ -0,0 +1,95 @@
# Spring 5 course : Udemy - Unit 1
[toc]
## Unit 1: course content
### Getting the most of the course
- download the github repo and use git diff on branches (start of the course / end of the course)
- fork the repositories to my own github account and start from the fork to follow the course and commit to my personal Github acc.
- Spring Boot Cookbook at the end of the course
### Setting up the dev env for Spring
- Jdk 8 or higher (I will use 17)
- Maven 3.25 of higher (I will use 3.8.6)
- Gradle 3.41. or higher (I will use 7.5.1)
- *use maven or gradle as you prefer*
```
#check java is installed
java -version
#check JDK is installed
javac -version
#verify maven is installed
mvn -v
#verify gradle is installed
gradle -v
```
### What's new in Spring Famework 5?
#### Core Framework Revision
- what is reflextion in java?
**Tips:** @Nullable and @NotNull annotations to explicitly mark nullable arguments and return values. This enables dealing null values at compile time rather than throwing NullPointerExceptions at runtime.
Session 1 - 26/10/2022 - stoped reading [@here](https://sparkers.udemy.com/course/spring-framework-5-beginner-to-guru/learn/lecture/7577382#overview)
<hr>
#### Reactive Programming Model
An exciting feature in this Spring release is the new reactive stack Web framework.
Being fully reactive and non-blocking, this Spring Framework 5.0 is suitable for event-loop style processing that can scale with a small number of threads.
[Reactive Streams](http://springframework.guru/reactive-streams-in-java/) is an API specification developed by engineers from Netflix, Pivotal, Typesafe, Red Hat, Oracle, Twitter, and Spray.io. This provides a common API for reactive programming implementations to implement. Much like JPA for Hibernate. Where JPA is the API, and Hibernate is the implementation.
With Spring Webflux, you can now create WebClient, which is reactive and non-blocking as an alternative toRestTemplate.
A WebClient implementation of a REST endpoint in Spring 5.0 is this.
```java
WebClient webClient = WebClient.create();
Mono person = webClient.get()
.uri("http://localhost:8080/movie/42")
.accept(MediaType.APPLICATION_JSON)
.exchange()
.then(response -> response.bodyToMono(Movie.class));
```
While the new WebFlux module brings us some exciting new capabilities, traditional Spring MVC is still fully supported in Spring Framework 5.0.
### Getting help with the Spring Framework
- 1- there sis a Q&A section under the video in Udemy
- 2- link to the course wiki https://github.com/springframeworkguru/spring5webapp/wiki
**Tips**: from IntelliJ you can create a gist (right click + create a gist).
- Be clear and give context
- Provide the stacktrace
- Provide a link to a ***gist*** or to your ***Github repo***
Session 2 - 27/10/2022
<hr>

16
unit2_building_spring_boot_webapp.md

@ -0,0 +1,16 @@
# Spring 5 course : Udemy - Unit 2
[toc]
## Unit 2: Building a Spring Boot Web App
*Quick overview of Spring in a very productive way.*
Generate html with dynamic content.
Disclaimer: how to use this but not going fully in details in this chapter.
- Spring Boot
- Spring MVC
- Spring Data JPA (Hibernate)
- H2 database
Loading…
Cancel
Save