🚀 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
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
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
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
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 😉
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()
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.
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(); } }
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 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
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
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... 😋
@@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.
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
Newest IntelliJ version does this automatically. Search for „inlay hints“ in the preferences to turn on/off. I personally find it distracting and annoying. 😉
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
Yes it's always the best way to test time, i learned it in my internship
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
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
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
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 😉
It was wonderful.Thanks a lot✌
Nelson, I smashed the like button five times.
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) ?
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.
great , thanks for showing how to organise
really good content, i came across this problem today, but now I know how to solve this :D
thanks mate for all your videos, they are very helpful! PS can u pls send some of the heat back to Aus
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 have a question : if a java web dev so i should use what idj eclipse vscode or more ?
I guess you also need to configure Clock Bean in your app config. Otherwise you'd get NoSuchBeanDefinitionException
Yeah, it's cool stuff, but you can also use MockedStatic to mock LocalDateTime
great! it's helpful for me . thanks bro
Iam watching your video right now it inspires me please make regular videos pls bro😟😟😟😟
amazing video that teaches me to be better
@Amigoscode
What's the progress bar do you use?
Hey @amigos , please try to make video on spring boot with antlr.
Thanks ! 💕
Hi…Salam, do you know if there are any online internship programs available where people can work voluntarily(unpaid)?
Totally smahed that like button.
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();
}
}
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
Thank you so much!
Great video as always
thank u very much!!
can you talking about atomicreference
Where is the stackoverflow link to the Java data/time description?
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
Assalamualaikum,
Please try to make videos on Android development. I love your videos.
Can i get the link of the java docs where this is mentioned?
This explanation is amazing, I was doing LocalDateTime.now() always wrong
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
You rock ❤😊
If token was expired at current date-time why it becomes valid if we add time?
always watching you
Awesome content
We're missing your "A Salaaaamo Alaykom" in the intro...
Great video tho, thank you bro.
Funny at starting 🤣
And were is the SO link for the time instances?
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
great job bro
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.
This is a beautiful video... thumbs up ! subbed and liked .... a fellow creator.,
Hello, could you please give link to stackoverflow
stackoverflow.com/questions/32437550/whats-the-difference-between-instant-and-localdatetime
Hi Nelson, you missed "to" in the title.
Or you can just use a date provider class which is arguably a lot more simple
Good....
Great!
Great vid
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 can i take some classes from you
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 guys, who knows Amigos IDE theme name?
the discord doesn't work ; (
Hi there I smash the button 😂
nice !
Helpline📲📥⬆️
Questions can come in⬆️
how to destroy jwt token on logout in spring boot
can you tell us about your religion background did you born as a muslim or you converted to islam
Please could you provide the GitHub address
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