Spring Tips: Making the Joyful Jump to Java 21

  Рет қаралды 30,022

SpringDeveloper

SpringDeveloper

9 ай бұрын

Hi, Spring fans! Java 21 and GraalVM supporting Java 21 are at long last here! It's been a long time in coming, but Java 21 - which comes out later today on the 19th of September, 2023 - brings with it some of the most exciting new features of any Java release. In this video, I ( / @coffeesoftware ) will look at some of the foundational features from Java 17 and see how they culminate in Java 21. I'll look at the biggest features - virtual threads and pattern matching. I'll also look at some of the quality-of-life features that you might not otherwise notice, but that are nice to have. And of course, I'll touch on how virtual threads integrate with Spring Boot 3.2. And, as a bonus, I am joined by two fellow Java Champions (and friends) Enrique Zamudio (x.com/@chochosmx) and Eddú Meléndez (x.com/eddumelendez). There's never been a better time to be a Java developer, and the fun starts right here! #GraalVM #Java #Java21 #SpringBoot #Java

Пікірлер: 31
@user-er7ee5uo6u
@user-er7ee5uo6u 3 ай бұрын
3:50 - Multiline String 5:19 - Record 7:33 - Enhanced Switch 11:50 - Sealed Types 18:46 - Next Level Pattern Matching 23:29 - Improved mathematics 25:37 - Future state 27:57 - AutoCloseable HTTP Client 29:50 - String Enhancements 32:00 - Sequenced Collections 35:53 - Virtual Threads and Project Loom
@hansmelo32
@hansmelo32 9 ай бұрын
The hype finally reached the Java ecosystem.
@apffer
@apffer 9 ай бұрын
excelent! Thank you! 👍🏻☕️
@Peterzinho182eH
@Peterzinho182eH 5 ай бұрын
Excellent content, thanks!
@freebusdoctor
@freebusdoctor 9 ай бұрын
excellent intro
@YoavNaaman
@YoavNaaman 9 ай бұрын
On assertion the first argument is the expected and the second is the actual value. Besides that very nice 👍🏻
@sandrodelacruz8125
@sandrodelacruz8125 9 ай бұрын
Josh, get a professional microphone please.
@pradhyumnakandamuru
@pradhyumnakandamuru 9 ай бұрын
love u josh ❤
@IvanRandomDude
@IvanRandomDude 9 ай бұрын
TDT - Test Driven Tutorial was born. Also, are there any downsides of using virtual threads inside Spring since we have to manually enable them @46:20? I assumed they would be automatically enabled. Since they are not does it means that enabling them is not always the best idea?
@TheHugoo10
@TheHugoo10 9 ай бұрын
Maybe since spring boot 3.x is compatible with java 17 it won't be enabled by default until spring boot 4.x?
@tepexpanv6157
@tepexpanv6157 9 ай бұрын
La mejor intro 😂
@MrSergpank
@MrSergpank 9 ай бұрын
great video, especially introduction! if you could add timecodes to all features listed ---> I will be your best fan!
@larsroe5811
@larsroe5811 7 ай бұрын
0:00 Introduction 3:45 Multiline Strings (Java 17) 5:14 Records 7:26 Enhanced switch statement 11:41 Sealed Types (Java 17) 18:38 Records with Sealed Types 23:29 Math enhancements 25:38 Future 27:57 Http with Future 29:48 Character.isEmoji() and StringBuilder's repeat method 32:00 SequencedCollection 35:54 Project Loom and Virtual Threads
@MrSergpank
@MrSergpank 7 ай бұрын
@@larsroe5811 Thanks Brother!
@AntropomorficznaPersonifikacja
@AntropomorficznaPersonifikacja 9 ай бұрын
Could you use this plugin that shows what shortcut you use ?
@guttormvik6335
@guttormvik6335 8 ай бұрын
I worry about sealed types; Library creators will use it and it will no longer be possible to create a MyXxxx extends Xxxx to fix them. Final is already a problem, but in that case I can at least (in some cases) create a copy of the entire class. Records are very nice for tuplets, like Size, Point, Color, but are a terrible idea for anything with more values, or if you need to change anything. Let's hope we can get rid of getters and setters on regular classes (without lombok) in a later version
@vanivari359
@vanivari359 9 ай бұрын
31:45 ... so... where is the pad-left / pad-right which i need surprisingly often?
@teodortodorov8548
@teodortodorov8548 9 ай бұрын
not sure one but your logo looks like the Durex one :D
@anishpanthi6093
@anishpanthi6093 9 ай бұрын
How is the reactive system different from Virtual Threads now?
@vanivari359
@vanivari359 9 ай бұрын
For many (most) Java developers out there, the reactive model is hard to read, understand, use and debug. It is what it is, Flux, Mono - The API is not intuitive at all for long time Java developers as well as junior developers fresh from university. That and the fact that performance and resource advantages in reality are often neglectable means that adoption is still very low and it gets even more complicated if you add blocking legacy code into the equation. I would say that virtual threads are a more intuitive Java-way to solve the problem (you can argue about better or worse) and you don't need to change all your code and use that reactive API and care about blocking and nonblocking stuff, you "just" replace the Executor because Loom took care to retrofit all the blocking code in the JDK to be virtual-thread-aware. There is some stuff (e.g. synchronized methods pinning the virtual thread) where you have to be careful and find solutions (e.g. using ReentrantLock), but overall it is much easier to use (because transparent) and will be adopted very fast compared to the reactive model with significant impact on performance and resources. I've seen a paper, where the virtual thread model also outperformed the reactive model, but you have to be careful with any performance comparison anyways because one line of code can make a giant difference. But random educated guess: virtual threads are the deathblow to mass-adoption of reactive in Java. It has it's value in stream processing, but for most use-cases the transparent use of virtual threads will be the go-to solution.
@minilord11
@minilord11 9 ай бұрын
Your build is currently configured to use Java 21 and Gradle 8.3. Also used 8.5 nightly build. Can someone help?
@Rssident
@Rssident 9 ай бұрын
It's nice to see Java finally getting features Scala had 15 years ago. Welcome to the future.
@ResolutionAdvisory
@ResolutionAdvisory 9 ай бұрын
Uuuuuuhhh Scala hahahaha
@chauchau0825
@chauchau0825 9 ай бұрын
still no one wants to use Scala after 15 years later except the minority group keeps whining: I am better than you! I know better than you!. But really no one cares because Scala is not revelant
@debkr
@debkr 9 ай бұрын
The sealed class example was horrible
@TheJabberwahh
@TheJabberwahh 9 ай бұрын
Too loud keyboard :(
@AntropomorficznaPersonifikacja
@AntropomorficznaPersonifikacja 9 ай бұрын
It’s perfect, real asmr for programmers
@andrews4379
@andrews4379 9 ай бұрын
Ugly code, dont use swtich and if's
@walterclementsjr.5947
@walterclementsjr.5947 9 ай бұрын
nice claim. can the junior show us the alternatives?
@andrews4379
@andrews4379 9 ай бұрын
@@walterclementsjr.5947 polymorphism will help you
Spring Tips: DataSources
57:40
SpringDeveloper
Рет қаралды 13 М.
Spring Tips: Spring Boot 3.2
1:21:52
SpringDeveloper
Рет қаралды 74 М.
When You Get Ran Over By A Car...
00:15
Jojo Sim
Рет қаралды 7 МЛН
Must-have gadget for every toilet! 🤩 #gadget
00:27
GiGaZoom
Рет қаралды 11 МЛН
Keynote: Introducing Spring Framework 6
1:03:04
SpringDeveloper
Рет қаралды 37 М.
Spring Office Hours - Episode 42 - Virtual Threads
1:03:06
SpringDeveloper
Рет қаралды 2,2 М.
Spring Tips: Spring Statemachine
59:46
SpringDeveloper
Рет қаралды 52 М.
Spring Tips: Spring AI
22:48
SpringDeveloper
Рет қаралды 59 М.
Spring Tips: Spring Boot & Apache Kafka
42:59
SpringDeveloper
Рет қаралды 24 М.
Spring Tips: Spring Modulith
37:39
SpringDeveloper
Рет қаралды 14 М.
Spring Tips: the road to Spring Boot 3: Spring Framework 6
28:37
SpringDeveloper
Рет қаралды 48 М.
Spring Tips: Spring's Application Event Subsystem
20:23
SpringDeveloper
Рет қаралды 13 М.
Spring Office Hours S3E4 - Common Spring Developer Mistakes
1:01:39
SpringDeveloper
Рет қаралды 3,8 М.
Lid hologram 3d
0:32
LEDG
Рет қаралды 10 МЛН
Simple maintenance. #leddisplay #ledscreen #ledwall #ledmodule #ledinstallation
0:19
LED Screen Factory-EagerLED
Рет қаралды 10 МЛН
Неразрушаемый смартфон
1:00
Status
Рет қаралды 2,2 МЛН
1$ vs 500$ ВИРТУАЛЬНАЯ РЕАЛЬНОСТЬ !
23:20
GoldenBurst
Рет қаралды 1,4 МЛН
Asus  VivoBook Винда за 8 часов!
1:00
Sergey Delaisy
Рет қаралды 1,2 МЛН