🚀 Thanks to Mailgun for sponsoring this video! Head to mailgun.com/amigoscode to try Mailgun today. 🚀 Register your interested for bootcamp here: amigoscode.hopp.to/bootcamp-register-interest
Maasha Allah, Nelson, you really are natural. May Allah increase you in knowledge and reward you abundantly. And I personally cannot thank you enough, because you transformed my life as a Java back-end developer, once again, JazaakAllahu Khair
Our Senior Java developer tought us to use LocaltTime.now() method to test but now i learned a new way of doing. i just need to undestand the reason and start using it. Thanks man
Thank you Mann, very interesting moment, I've seen it before in the code, but newer pay attention to this, now I know why smart devs use 'clock' together with local datetime. Very helpful. Please do more videos like this, together with the test example 😉
In my opinion, the best and practice way is create an DateProvider interface. Then we will use DI for own services, and in the tests we use mocks for DateProvider interface. For DateProvider implementation we use LocalDateTime api
Suggestion: Try to scroll the screen in a way that the code to be added or removed always stays near the center of the page, that will help people that uses the closed caption to be able to see the code while also reading the captions. When you edit a code that is too close to the bottom of the view-port we can't see it because the captions will be overlaying it.
I would also advise to use FixedClock implementation of Clock (which is a inner class of Clock) instead of mocking. Less mocking is always better, just call Clock.fixed()
Thank you for all course. Can't wait for new interesting one. I hope to see a course which replicate system design of twitter, uber, facebook... using java, kafka, rabbitmq ect. This one Microservices and Distributed Systems is amazing.
I got error "required a bean of type 'java.time.Clock' that could not be found, Consider defining a bean of type 'java.time.Clock' in your configuration." when Inject ("private final Clock clock") in my service but I did not see Configuration Class in the video?
I had the same problem. It seems like Spring expects a bean definition for the autowired Clock class. To solve that I added a class where I defined the bean. I looks like this : @Configuration public class ClockConfig { @Bean public Clock clock() { return Clock.systemDefaultZone(); } }
Hey hi Nelson it as awesome session thankyou to make a great session but can you please make a longer session on Date time because it is a complex concept thankyou again but if possible then please make a longer session specific on date time
Can you make a video tutorial on how to setup maven(and the problems that come with not setting up pom.xml correctly) and missing springboot plugins properly using Intellij ?. I have been struggling with errors regarding my plugins and I have surfed so many blogs for solutions but I still can't make my ide properly work without these errors whenever i download my plugins for my projects. Please when u can I'd widely appreciate it
@@sykexz6793 my comment is based on the human psyche :P If u make a good vid and people stay to the end, then u have a much higher chance for people to like and subscribe.
Newest IntelliJ version does this automatically. Search for „inlay hints“ in the preferences to turn on/off. I personally find it distracting and annoying. 😉
i am your brother from Egypt , slamo alikom my brother . i am big fan fro you and interested very much in your great videos and tutorials .do you have a UDEMY channel for courses bro ?. i am beginner in the field with java . go on allah with you
Hi guys i am working on a project accidentally I deleted my table and schema sequence table both now spring jpa not creating my table getting errors I have used ddl-auto=update Plz help me mysql8
Hello brother...🤟 How I will be became like you...🤔 I want to be like you man...😄 From where I should start learning advance Java ... I had done my core Java ... Please guide me & others like me who are following you 💡 my brother help us... 😋
Why adding clock if there is simpler way: private final DateTimeService dateTimeService; usage: dateTimeService.now() public class DateTimeService { public Date now() { return new Date();} // make your own implementation } p.s. also it seems your code exposes too much data out of confirmation token -> encapsulation issue.
excelent video. Your setUp method is not necessary, you just have to put the following annotation at the class level: "@ExtendWith(MockitoExtension.class)".
🚀 Thanks to Mailgun for sponsoring this video! Head to mailgun.com/amigoscode to try Mailgun today.
🚀 Register your interested for bootcamp here: amigoscode.hopp.to/bootcamp-register-interest
Great job bro
East or west ⬅️
Amigos code is the best 🤣
@@ishyo9220why laughing 😅
@@flyingrecordofficial
that's smile for expressing my feelings on Amigos code...🤟
I love it 😁
Hello Sir!
I am big fan of you.
Can you build a Master course on spring boot with javafx.
Because no one can explain briefly like you
I spent 2 hours trying to mock LocalDate in my application with no success. This video pointed exactly what I wanted.
A big thanks to you
👍
Yes it's always the best way to test time, i learned it in my internship
Maasha Allah,
Nelson, you really are natural.
May Allah increase you in knowledge and reward you abundantly.
And I personally cannot thank you enough, because you transformed my life as a Java back-end developer, once again, JazaakAllahu Khair
Our Senior Java developer tought us to use LocaltTime.now() method to test but now i learned a new way of doing. i just need to undestand the reason and start using it.
Thanks man
Even when he said smash that like button only few people did, this is free golden contents and it costs nothing on your end.
Thank you Mann, very interesting moment, I've seen it before in the code, but newer pay attention to this, now I know why smart devs use 'clock' together with local datetime. Very helpful. Please do more videos like this, together with the test example 😉
Nelson, I smashed the like button five times.
In my opinion, the best and practice way is create an DateProvider interface. Then we will use DI for own services, and in the tests we use mocks for DateProvider interface. For DateProvider implementation we use LocalDateTime api
It was wonderful.Thanks a lot✌
Suggestion:
Try to scroll the screen in a way that the code to be added or removed always stays near the center of the page, that will help people that uses the closed caption to be able to see the code while also reading the captions. When you edit a code that is too close to the bottom of the view-port we can't see it because the captions will be overlaying it.
really good content, i came across this problem today, but now I know how to solve this :D
I would also advise to use FixedClock implementation of Clock (which is a inner class of Clock) instead of mocking. Less mocking is always better, just call Clock.fixed()
agree, much better
Thank you for your videos!!
Could u make the video about where you need use the certain time class(LocaleDateTime, Instant, Date and etc) ?
great , thanks for showing how to organise
Thank you for all course. Can't wait for new interesting one. I hope to see a course which replicate system design of twitter, uber, facebook... using java, kafka, rabbitmq ect. This one Microservices and Distributed Systems is amazing.
Iam watching your video right now it inspires me please make regular videos pls bro😟😟😟😟
amazing video that teaches me to be better
thanks mate for all your videos, they are very helpful! PS can u pls send some of the heat back to Aus
i have a question : if a java web dev so i should use what idj eclipse vscode or more ?
great! it's helpful for me . thanks bro
Great video as usual! Would love some Go content as well :)
I got error "required a bean of type 'java.time.Clock' that could not be found, Consider defining a bean of type 'java.time.Clock' in your configuration." when Inject ("private final Clock clock") in my service but I did not see Configuration Class in the video?
I had the same problem. It seems like Spring expects a bean definition for the autowired Clock class. To solve that I added a class where I defined the bean. I looks like this : @Configuration
public class ClockConfig {
@Bean
public Clock clock() {
return Clock.systemDefaultZone();
}
}
Yeah, it's cool stuff, but you can also use MockedStatic to mock LocalDateTime
Totally smahed that like button.
Great video as always
I guess you also need to configure Clock Bean in your app config. Otherwise you'd get NoSuchBeanDefinitionException
@Amigoscode
What's the progress bar do you use?
Where is the stackoverflow link to the Java data/time description?
Thank you so much!
Can i get the link of the java docs where this is mentioned?
Assalamualaikum,
Please try to make videos on Android development. I love your videos.
And were is the SO link for the time instances?
If token was expired at current date-time why it becomes valid if we add time?
thank u very much!!
Hey hi Nelson it as awesome session thankyou to make a great session but can you please make a longer session on Date time because it is a complex concept thankyou again but if possible then please make a longer session specific on date time
Can you make a video tutorial on how to setup maven(and the problems that come with not setting up pom.xml correctly) and missing springboot plugins properly using Intellij ?. I have been struggling with errors regarding my plugins and I have surfed so many blogs for solutions but I still can't make my ide properly work without these errors whenever i download my plugins for my projects. Please when u can I'd widely appreciate it
Hey @amigos , please try to make video on spring boot with antlr.
Thanks ! 💕
can you talking about atomicreference
You rock ❤😊
u should put like and subscribe section at the end of the video
not everybody watches till the end
@@sykexz6793 my comment is based on the human psyche :P If u make a good vid and people stay to the end, then u have a much higher chance for people to like and subscribe.
Awesome content
always watching you
great job bro
Hi…Salam, do you know if there are any online internship programs available where people can work voluntarily(unpaid)?
How do you show usages conters ?
Newest IntelliJ version does this automatically. Search for „inlay hints“ in the preferences to turn on/off. I personally find it distracting and annoying. 😉
@@cdhagen I have the latest version but still dont have them displayed. I think they are useful when working on bugs/tests and debuging :)
Hello, could you please give link to stackoverflow
stackoverflow.com/questions/32437550/whats-the-difference-between-instant-and-localdatetime
the discord doesn't work ; (
We're missing your "A Salaaaamo Alaykom" in the intro...
Great video tho, thank you bro.
i am your brother from Egypt , slamo alikom my brother . i am big fan fro you and interested very much in your great videos and tutorials .do you have a UDEMY channel for courses bro ?. i am beginner in the field with java . go on allah with you
Funny at starting 🤣
Hi guys i am working on a project accidentally I deleted my table and schema sequence table both now spring jpa not creating my table getting errors I have used ddl-auto=update
Plz help me mysql8
Hi Nelson, you missed "to" in the title.
Great vid
Or you can just use a date provider class which is arguably a lot more simple
Great!
Hello brother...🤟
How I will be became like you...🤔
I want to be like you man...😄
From where I should start learning advance Java ... I had done my core Java ... Please guide me & others like me who are following you 💡 my brother help us... 😋
Hey, search for the video which talks about roadmap made by Amigoscode, I'm sure it will help
Hello guys, who knows Amigos IDE theme name?
how to destroy jwt token on logout in spring boot
Hi there I smash the button 😂
hello can i take some classes from you
This explanation is amazing, I was doing LocalDateTime.now() always wrong
This is a beautiful video... thumbs up ! subbed and liked .... a fellow creator.,
Good....
nice !
Helpline📲📥⬆️
Questions can come in⬆️
Please could you provide the GitHub address
can you tell us about your religion background did you born as a muslim or you converted to islam
1st view
Can you teach slowly because sometimes you so fast .
Why adding clock if there is simpler way:
private final DateTimeService dateTimeService;
usage: dateTimeService.now()
public class DateTimeService {
public Date now() { return new Date();} // make your own implementation
}
p.s. also it seems your code exposes too much data out of confirmation token -> encapsulation issue.
excelent video. Your setUp method is not necessary, you just have to put the following annotation at the class level: "@ExtendWith(MockitoExtension.class)".
he also needs to create a When call into the method
@@erickjhormanromero6905 yes, then only mock with clock. OpenMocks line and constructor is not necessary over there