Spring Boot with Kotlin & JUnit 5 - Tutorial 8 - GET Single Bank

preview_player
Показать описание

# Spring Boot - Web Layer - GET Endpoint for a Single Bank & Testing with JUnit 5
Similar to the GET endpoint that retrieves all banks, it is common to have GET endpoints that return a single entity based on some identifier provided in the path (the URL).
In this video, we create such an endpoint that allows fetching a single bank based on its account number. You’ll learn how to read path variables in Spring Boot (using @PathVariable). Plus, we continue using test-driven development (TDD) and write integration tests with @SpringBootTest and JUnit 5 to check the behavior of our new GET endpoint.

# Social

# GitHub Repository for This Tutorial Series

# Learn Kotlin
Kotlin Masterclass: planned
JUnit 5 Bootcamp: planned
☝️ Please sign up for early bird access above to be notified as soon as they launch!

# Check out Peter’s Udemy Courses
Рекомендации по теме
Комментарии
Автор

I think i will watch every of your tutorials now. Respect to your work and explaining.

Kasula
Автор

This series of tutorials is awesome in so many levels

shakilahmed
Автор

Hey everyone, thanks for sticking to the tutorial series! You're already half-way done (even before this video) 😀

Keep your suggestions on other topics coming. What are you planning to learn in 2021?

PeterSommerhoff
Автор

Thank you for your videos and hello from Russia!)

akon
Автор

Very nice tutorial I've learnt sring boot and kotlin as well :D

for next videos would be awesome, something about authentication and connect with DB

HeyRicardoPerez
Автор

it would be very useful to have a tutorial on git and github with relevance to this springboot application. Thanks Peter .. great tutorials. Looking forward to Tutorial 9

drbaz
Автор

You don't really need to "invalidate caches and restart" IDE. Just hit apply on settings when you make some changes. It will work

happy.sngh
Автор

Great video series, Unfortunately YouTube is trying their best to annoy us with ads, I've spent so much time closing the adds that I couldn't even follow up with the tutorial

shsoh
Автор

Great series of tutorials!
What if there are more than one repository classes implementing the same BankDataSource interface, how does Spring know which bean instance to inject into BankService? Thanks!

haochang
Автор

20:19 what is ?: can you explain instead of making us memorise the syntaxs?

zr
Автор

How do you get those suggestions at the bottom your screen? Did you edit them in the video or did the IDE provided them to you? They are super helpful!

tsamridh
Автор

Can you explain how Spring boot has access to the mockdatsource without importing it or declaring it?

zr
Автор

When I run my tests, the console is blank for the passed tests unlike yours. Is there any solution for this problem?

abhisheksaxena
Автор

I do not really understand the exception handling part, why it is necessary.
When we do and this account number does not exist, a "NoSuchElementException" is thrown. We can't we just "expect" this exception to be thrown in JUnit? Or maybe just try/catch?

diskostu
Автор

1. How to test accountNumber that was generated by UUID ?
2. We always rely with Bank data in our tests but these data can change (if we use Db for example) and our test will fail

caffeinejavacode
Автор

i think you need to mentione Bank? optional type for bank when using firstOrNull

codestudy
Автор

Gradle has update now u dont have to switch to Intellij to run test @displayname will show correctly in gradle itself

HarshKumar-kvxs
Автор

Python remote control exploit create small tutorial video bro 😀😀😀

s.aravindh
Автор

You got me lost in junit5 nested class, this is literally the worst programming practice in entire programming world, nested classes, nested exceptions, welcome to java 2000

mr_wormhole
join shbcf.ru