- 18
- 122 377
Tech Recipes - Dipesh Hadye
India
Приєднався 29 чер 2020
Software development is simplified here!
You will find tutorials, step-by-step guides, interview tips related to Software Development. Some of the technologies that will be covered are Java, Spring, Angular, Apache Kafka, Computer Science basics.
Feel free to leave any comments, questions, or requests. I will do my best to address them. :)
Thank you.
Dipesh Hadye
You will find tutorials, step-by-step guides, interview tips related to Software Development. Some of the technologies that will be covered are Java, Spring, Angular, Apache Kafka, Computer Science basics.
Feel free to leave any comments, questions, or requests. I will do my best to address them. :)
Thank you.
Dipesh Hadye
Spring Boot 3 Recipes | How to Configure Bean in Sprinboot application?
#Sprinboot #Bean #Inject #Autowired
Spring Boot 3 Recipes | How to Configure Bean in Sprinboot application?
_____________________________________________________________________________________
You can find all the code here -
Github - github.com/tech-recipes/spring-boot-helloworld
_____________________________________________________________________________________
00:00 Overview
00:19 What is Bean ?
01:52 How to configue Bean?
04:32 How to Inject Bean?
06:31 Code demo
12:00 Summary
____________________________________________________________________________________
Links to tools used in the video:
Intellij Idea: www.jetbrains.com/idea/
Spring Boot 3 Recipes | How to Configure Bean in Sprinboot application?
_____________________________________________________________________________________
You can find all the code here -
Github - github.com/tech-recipes/spring-boot-helloworld
_____________________________________________________________________________________
00:00 Overview
00:19 What is Bean ?
01:52 How to configue Bean?
04:32 How to Inject Bean?
06:31 Code demo
12:00 Summary
____________________________________________________________________________________
Links to tools used in the video:
Intellij Idea: www.jetbrains.com/idea/
Переглядів: 195
Відео
How to build a Spring Boot application? | Spring Boot 3 Recipes #1
Переглядів 254Рік тому
#Sprinboot #Helloworld #Spring Spring boot 3 Recipes | How to build a Spring Boot application? You can find all the code here - Github - github.com/tech-recipes/spring-boot-helloworld 00:00 Overview 00:30 Why Spring boot ? 01:42 All Steps 02:30 Step 1 - Spring Intializr 03:30 Step 2 - Import and Setup Code 04:41 Step 3 - HelloWorldController 06:07 Step 4 - Build a Jar 07:37 Summary Links to too...
Guide to CountDownLatch in Java | When and How to use ?
Переглядів 2,2 тис.2 роки тому
#Java8 #CountDownLatch #Concurrency Guide to CountDownLatch in Java - When and how to use CountDownLatch? You can find all the demo code here - Github - github.com/tech-recipes/java-concurrency 00:00 Overview 00:26 What is CountDownLatch? 02:52 Example Explained 05:13 Code Demo Links to tools used in the video: Intellij Idea: www.jetbrains.com/idea/
How to read JSON file in Java? ( Jackson Databind )
Переглядів 20 тис.2 роки тому
#Java8 #json #jackson #databind How to read JSON file in Java? ( Jackson Databind ) In this, we are going to learn how to read a json file in java. We will use jackson databind library here and we will see single and list of objects use case. You can find all the demo code here - Github - github.com/tech-recipes/java-file-op 00:00 Overview 00:19 JavaScript Object Notation 02:01 Jackson Databind...
Java Interview Problems | Return statement in try catch finally block in Java
Переглядів 4402 роки тому
#Java #Interview #TryCatchFinally Java Interview Problems | Return statement in try catch finally block in Java We will see interview problems having try catch finally blocks with return statement in it. 00:00 Overview 00:38 Problem 1: return in catch and finally 03:20 Concepts to remember 04:18 Problem 2: return in catch and not in finally 05:54 Problem 3: return in finally with assigned varia...
How to read and process CSV file in Java? (with Streams)
Переглядів 15 тис.2 роки тому
#Java8 #csv #Stream How to read and process CSV file in Java? ( with Streams) In this, we are going to learn how to read a csv file in java. We will see advanced use cases like streaming a CSV file as stream and performing map, filter, group by operations on stream. You can find all the demo code here - Github - github.com/tech-recipes/java-file-op 00:00 Overview 00:14 Comma Separated Values 01...
CompletableFuture in Java 8: Comments answered (Part 3)
Переглядів 1,3 тис.2 роки тому
#Java8 #CompletableFuture #Async CompletableFuture in Java 8: (Part 3) This video I will be answering questions/comments from Part 2 of the video. You can find all the demo code here - Github - github.com/tech-recipes/completable-future 00:00 Overview 00:33 allOf() with different types 08:36 exception handling 11:26 theCombine() Links to tools used in the video: Intellij Idea: www.jetbrains.com...
How to read a text file in Java? (with Streams)
Переглядів 2,5 тис.2 роки тому
#Java8 #readTextFile #Stream How to read a text file in Java? (with Streams) In this, we are going to learn how to read a text file in java. We will see advanced use cases like reading a text file as stream and processing. You can find all the demo code here - Github - github.com/tech-recipes/java-file-op 00:00 Overview 00:31 Read complete file into String 01:54 Java 11: Files.readString(path) ...
CompletableFuture in Java 8 - (Part 2)
Переглядів 8 тис.3 роки тому
#Java8 #CompletableFuture #Async CompletableFuture in Java 8: (Part 2) In this, we are going to learn Asynchronous Programming in java using CompletableFuture. We will see advanced use cases using CompletableFuture like combining or chaining mutiple futures and exception handling. You can find all the demo code here - Github - github.com/tech-recipes/completable-future 00:00 Overview 00:32 Comp...
CompletableFuture in Java 8 - (Part 1)
Переглядів 23 тис.3 роки тому
#Java8 #CompletableFuture #Async CompletableFuture in Java 8: (Part 1) In this, we are going to learn Asynchronous Programming in java using CompletableFuture. We will see the motivation behind adding this feature and then how to use it in our code for example. You can find all the demo code here - Github - github.com/tech-recipes/completable-future 00:00 Overview 00:22 Synchronous vs Asynchron...
Java 16: Records - why and how to use ?
Переглядів 4 тис.3 роки тому
#java16feature #record #jep395 Records in Java 16 - Why and how to use? In this, we are going to learn a new feature added in Java 16 which is records. We will see the motivation behind adding this feature and then how to use it in our code with examples. You can find all the demo code here - Github - github.com/tech-recipes/jdk16-demo 0:00 Overview 0:36 Why records? 3:21 Record classes 5:09 De...
Spring Kafka #4: Kafka consumer application with Spring boot (Step-By-Step)
Переглядів 2,9 тис.3 роки тому
#Kafka #Springboot #Consumer Spring Kafka #3: Build a Kafka consumer application with Spring boot This is the 4th video of the Spring Kafka series. In this, we are going to see how to build a Spring boot application that consumes messages from Kafka topic. You can find all the demo code here - Github - github.com/tech-recipes/spring-kafka-consumer 0:00 Overview 0:15 Consumer Concepts 2:36 Steps...
Spring Kafka #3: Kafka producer application with Spring boot (Step-By-Step)
Переглядів 1,2 тис.3 роки тому
#Kafka #Springboot #Producer Spring Kafka #3: Build a Kafka producer application with Spring boot This is the third video of the Spring Kafka series. In this, we are going to see how to build a Spring boot application that produces messages on Kafka topic. You can find all the demo code here - Github - github.com/tech-recipes/spring-kafka-producer/ 0:00 Overview 2:20 Step 1: Generate Spring pro...
Spring Kafka #2: Setup Apache Kafka on local machine (Step-By-Step)
Переглядів 7673 роки тому
#Kafka #Spring #Setup Spring Kafka #2: Apache Kafka Setup on the local machine (Windows 10) This is the second video of the Spring Kafka series. In this, we are going to see how to set up on local and use Apache Kafka using CLI. 0:00 Overview 1:47 Step 1: Download Kafka 3:33 Step 2: Start ZooKeeper server 4:21 Step 3: Start Kafka broker 5:28 Step 4: Use CLI to work with the topic. Links to tool...
Spring Kafka #1: Kafka Basics
Переглядів 1,3 тис.3 роки тому
#Kafka #Spring #Basics Spring Kafka #1: Kafka Basics. This is the very first video of the Spring Kafka series. In this, we are going to explore the fundamental concepts of Apache Kafka. 0:00 Overview 0:11 What is Kafka? 2:13 When to use? 3:36 Kafka Concepts 5:21 Example: Car-pool app 9:45 Kafka Cluster Links to tools used in the video: Apache Kafka: kafka.apache.org/
Step-By-Step: Testing Reactive REST with @WebFluxTest and WebTestClient
Переглядів 4,4 тис.4 роки тому
Step-By-Step: Testing Reactive REST with @WebFluxTest and WebTestClient
Optional in Java 8: Why and When to use?
Переглядів 14 тис.4 роки тому
Optional in Java 8: Why and When to use?
Step-By-Step: Reactive REST (CRUD) application with Spring WebFlux + PostgreSQL.
Переглядів 22 тис.4 роки тому
Step-By-Step: Reactive REST (CRUD) application with Spring WebFlux PostgreSQL.
Thanks Sir ! A good Job ! You are explaining nicely with good examples. Thanks
Excellent explanation , was looking for it all over UA-cam. Wonder why this video didn't had reach. Thank you.
Root level knowledge shared.....Thanks a lot...
Very clear and concise explanation!!, Thanks
thank you answered my question
Thanks a lot brother 😊 How to Write function “validateYear” that validates a user entry against predefined data, and returns “OK” if it is valid data, or one of two error messages
what a explanation sir... I seen so many but little bit confusion. when i saw your video it is very clear
Very usefull, thank you
this is helpful , but you also add one video on message idempotancy. How Kafka template implements message idempotency
just love the patently you describe everything just awesome.. thanks a lot.. I have one question. Q . if we are forming a cluster of kafka then only one zookeeper is there or there must be multiple zookeeper for each kafka ??
Thanks, to answer. zookeeper is a separate application which can run in cluster or single server. Ideally in production we run zookeeper in cluster of 3 or 5. It has no relation with Kafka brokers number. We can have any number of Kafka brokers.
Best course on completableFuture by explaining each and every scenario that comes in my mind. Thanks a lot.
excellent. to the point. really good
Please upload this type of videos
This is the best explanation of countdown latch I found in the internet . Your videos are underrated 😊
Thanks 🙏🏼
Will it work even after deployment
Thanks for the explanation. Can you please cover more on Kafka? If you can create real time kafka project, it would be wonderful.
Thanks so much brother. This is a fantastic video. Learned a lot. I appreciate all your efforts. Please keep bringing more content.
Thanks for this awesome demo.
Thanks Tech Recipe. I liked the example of allOf. Very straight and simple way you showed us rather than going to typical one of using stream and calling join in map while iterating through. But I think instead of using DataWrapper if you could have used tuple of Java then it would have been great
Thanks so much
One of the best series for CompletableFuture. Thanks a lot.
Thank you!
HI bro Thank you so much for sharing knowledge on COmpletablefuture. in my project when i am using SupplyAsAsync(), i am getting compleation exception. It was showing message set RequestContext. Can you help on it
Hello, thanks. Can you point to code by sharing it on github ? May be snippet of code.
great work
Thank you!
How is it performance wise with 2+Gb JSON files? Are there any other solutions to read and process the json file in chunks?
Both Jackson and Gson have streaming implementations which can be used I believe. I need to check further and see if I can implement the same with streaming.
@@TechRecipesTR That would be awesome to see, thanks :)
This may be clean code than the old way . But seems too complicated
tysm
Great tutorial thanks, how can I create relations in the models?
Spring Data R2DBC isn't an ORM and doesn't support mapping like in Spring Data JPA. We need to write some code to do that. There are examples of how to do it on the web. I will try creating a video on the same, it may take a while though. Thanks.
nice way of explanation.. keep going bro
Thank you
Thanks a lot.
such a good content noone explains like you about jackson databind.thanks for teaching us .keep uploading good content
Thank you Arun!
Is this supported on newer spring boot versions? I had some errors recently
Yes. It must be supported. Do you remember what errors you faced ?
Your service initialization example solved a lot of doubts for me. Thank you.
instead of objectmapper you said bloomberg like that, what it is
Project Lombok projectlombok.org/ It will reduce boilerplate code like a getter setter constructor. We can simply use annotations instead.
In completablefuture when the main thread dies all the other thread dies (to prevent this we use the join method), but why is it behaving different over here... Even after the main thread finished the log from thread that took 7 seconds got printed.
In completable future threads which are created are daemon threads by default hence we had to join. Here we are using new Thread() so these are non-daemon threads hence thread continues even when main thread finishes.
@@TechRecipesTR🙏Appreciate
No problem, good observation 👍🏼
great! but I wonder how to save each object in an array?
or perhaps to an arraylist
you can use Collectors.toList() to collect into a List of Car objects. something like below would help. List<Car> cars = Files.lines(path) .skip(1) .map(CSVFileStream::getCar) .collect(Collectors.toList());
great sir.
Thanks for the tutorial but want to know how we will update tha version of the package jackson- databind from a old version to current version ???
You need to update the pom.xml with latest version of jackson-databind and rebuild the project. you can find latest version on - mvnrepository.com/. Thank you. <!-- mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind --> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.14.2</version> </dependency>
Very good guide. Thank you so much
Thanks you very Much!The series is very helpful!
finally a worthy video
Thanks a lot, short but clear description, very helpful.
Thanks for the explanations
Thanks for the explanations, my question is in relation to the concurrency, how to know whats is better... have only one instance with concurrency=5 or have five instances with concurrency=1 to processes events in one topic with five partitions.
What is the best practice to handle TimeoutException of CompletableFuture.get(timeout, TIMEUNITS.SECOND)?
It depends on use case. If data you are waiting for is mandatory to proceed you can raise an exception and quit application or show error on UI to user if it is UI application and ask them to retry.
Very nice explanation :)
How can I do if get the file and data (single string) from UI side like Controller.java Public Book uploadJson(@RequestPart("data") String data, @RequestPart("file") List<MultipartFile> file){ Book response = jsonDataService.uploadJson(data,file); return response; jsonDataService.class public book uploadJson(String data, List<MultipartFile> file{ ObjectMapper objectMapper = new ObjectMapper(); List<Book> response = ObjectMapper.readValue(file, new TypeReference<List<Book>>(){}); Return response; } If the file is not in the resourses, How to read the file and data if get from UI side and send the response ?
Looking at your code. I see that you are getting List<MultipartFile> you can iterate to get individual MultipartFile and then use MultipartFile.getInpitStream() to read the file content coming from UI.
@@TechRecipesTR I have tried that I am getting File upload failed, where my file is nested Json file.
You should not upload it again as code is executing on the server itself. You can simply read the file using InputStreaam and use FileWriter to write it on disc. Hope this helps!
@@TechRecipesTR Thank you so much
please add name() method in the enum Make as you are using name() in the video,
great video
Thank you!
Wow this is exactly what I was looking for. Thank you!!
Fantastic tutorial, went smooth, very clear n explained very well. Many thanks!
Thank you!