Spring Boot Configuration Properties: Working with Lists & Maps
HTML-код
- Опубликовано: 31 май 2024
- In this tutorial you will learn how to create configuration properties in Spring Boot. This will bind properties to a type (class or record) and you will learn how to work with maps and lists.
🔗Resources & Links mentioned in this video:
GitHub Repo: github.com/danvega/list-map-p...
👋🏻Connect with me:
Website: www.danvega.dev
Twitter: / therealdanvega
Github: github.com/danvega
LinkedIn: / danvega
Newsletter: www.danvega.dev/newsletter
SUBSCRIBE TO MY CHANNEL: bit.ly/2re4GH0 ❤️ - Наука
Good stuff! Thanks for sharing!
Thanks for watching!
hit that subscribe button, this channel should have 100K in this year
That is my pipe dream goal for this year 🤩 Thank you!
Just subscribed. Good content Dan. I highly appreciate your content
Thank you, Dan.. very useful! :D
Great tutor! I love your videos
Super nice and new! Thx, Dane!
Great video, helpful stuff!
It was great. Thanks
Thank you infinitely for such an interesting and useful video 😊
I have always been defining properties in the application.properties file, however, lately I have tried to define in the application.yaml file and I find it very convenient, too 😊
Can you give us an example for Map to be written in yaml? That would help as this ones looks tricky
Gratitudes Dan!
Interesting. Why I don't need to add the key "url" for the website record?
The @Autowire annotation in the tests is redundant/not necessary since some time, right?
Hi Dan! I'm wondering what provides an autocomplete for Spring properties in intellij? I don't have autocomplete for properties and would like to install it. Thanks in advance!
Intellij Idea Ultimate. The community edition doesnt have spring specific autocomplete
Sir, may I ask a question? Why do we use the @Autowired annotation instead of constructor injection? Are they the same? Thanks for enlightening.
Yes they are same
@@user-og7de8ih4f [As far as I am aware!] Technically they are not the same. Both accomplish the same goal. However, field injection uses Java Reflection which costlier than constructor injection. In addition, I believe field injection can potentially cause issues during testing due to the manner the object is initialized
I know the advice is to.use constructor injection
That's why I also interested to know why in test wore the field injection is used.
@@Muescha my understanding is that field injection is fine within the test itself, because you are not going to write a test for the test.
what's the name of this intellij theme?