This full course can be found here: amigoscode.com/p/spring-boot OTHER RECOMMENDED COURSES ► Java Essentials - amigoscode.com/p/java-essentials ► Spring Data JPA - amigoscode.com/p/spring-data-jpa ► Software Testing - amigoscode.com/p/software-testing Happy coding
Hey Amigos very nice videos you have. I want to build an ecommerce website with backend what should i do? I am a starting developer, i know java, html, css, javascript for now. Love to hear from you !! keep up the good work
Because of your videos I got an internship at a company here in Brazil. Thank you very much for all the knowledge transmitted, i wish you all the best my friend.
@@KadekBr pegue um stack que o mercado gosta como Spring Boot + Angular e estude bastante. Arrume bem sua página do LinkedIn com essas informações e você vai ficar sabendo de processos seletivos pra vagas. É preciso também dominar aspectos como dbs relacionais e não relacionais, autenticação, autorização, versionamento com git e outros. Firebase também é muito bem-vindo.
@@BrunoidGames obg pelo seu tempo, eu tenho algumas dessas habilidades já, tenho tb python, pascal, eletrônica, programação em C para Arduino. Estou tentando ficar mais experiente, a eu tb tenho habilidades matemáticas pois estou na metade do curso de Física. E somente não me dedico mais pela falta de tempo que a faculdade me consome.
You condensed about a third of what I learned over a 6 month boot camp into an hour and a half. I'm doing a refresher for a technical evaluation with a client. This is quality that so many tutorials on RUclips just can't reach. Thank you!
If you're missing Database tool window shown in 44:30, it's probably because you have IntelliJ Community Version. Only paid version of IntelliJ has access to that Database window. The alternative would be to use 3rd party database tools: 1. Go to View 2. Settings 3. Plugins 4. Type Database Browser and install it 5. Restart ide Now in tools - windows - Database Browser you can do almost the same thing but 3rd party one is kinda limited
ive never actually studied Spring Boot and found this clip but honestly i got overwhelmed lol i got surprised with that ppl here say its easy to follow. i feel like i need to have more foundational knowledge first and come back to this video.
This is the best tutorial for Spring boot. I just wish Nelson really left the promised links in the description of the video. Other than that, thanks for a great lesson Amigo!
This guy is a lifesaver! He manages to compress a ton of knowledge into a short, informative video. And the best part? It's completely free. You learn a valuable skill, then you can use that knowledge to your advantage in the future. The least I can do is like the video, subscribe to his channel, and share it with a friend who would also benefit from this knowledge. Thanks a lot man! You do make a difference!
Hi Nelson. I'm an experienced dev in many areas, but not in Spring Boot and JPA. I had frustrations trying to learn these from services like Udemy. But I found this course to be well paced, well presented, clear in voice and clear in content, and it's the first one I've got all the way through! I'll pick up the JPA course next. Thank you for this super content. But can I make one suggestion to make it even better? When teaching "getting started" courses, I think it's best to start with free tools. So I would suggest perhaps using either IntelliJ community, or something like VS Code. I used the latter, succesfully. Using a £399/year tool for a getting-started course isn't ideal. Similarly, I would have shown the API calls being made in the free version of Postman. Everything else was bang on though, so thank you.
Nothing he did in the video really requires IntelliJ Ultimate. I used IntelliJ Community to follow along. As for VSCode, while I like using text and compile from the command-line, I think it's going to get into the way of the tutorial if he has to keep building from the command-line every time. By using an IDE, he gets rid of all the unnecessary work that can distract from the content and focuses only on Spring Boot. Plus IntelliJ helps A LOOT when it comes to importing the correct classes, so you don't have to keep looking at what classes he is importing, you can just let IntelliJ do that for you.
I don't use to comment on youtube videos but this time I would like to thank you for sharing your knowledge in a great and understand way. Thanks a million from Spain!
I am 4 years android developer experience with fintech company you can't imagine how smoothly I understand this course. I cant thank you with simple words sir. First All thanks deserves Allah then you, thank you from the bottom of my heart you really change my programming world sir.
Can you explain more why you are putting the code in each class and the data flow of what is supposed to happen. What data gets passed where otherwise it gets confusing as you dont know where to start. (Need more concepts as said in your other video)
Your tutorial helped wrapping my head around dependency injection in Spring Boot. Thank you so much! A lot of the information one can find out there is outdated and no longer works, but yours worked like a charm!
at first I didn't see this, added the code you suggested, stop and restarted the server- still didn't see the table. Then I refreshed the database with the icon found once you click open the database tab, and it showed
wa Alaaikom Assalam brother, Thank you so much for your time and for the effort that you have put in this course, As, a python Guy, i found your course very interesting and informative. Thank you again May Allah bless you!
For anyone who has trouble getting the JSON to display at the API Layer section of the video, try adding: "@ComponentScan(basePackageClasses = StudentController.class" in the line immediately after "@SpringBootApplication" in the "DemoApplication.java" file.
This is so helpful and a super-easy introduction to Spring Boot! Had to figure out Postgres on my own because I'm on Windows, but it was pretty much smooth sailing after that. I'm looking to get back into software engineering after taking 3 years off and you're making my life much easier. Thank you Nelson for the course!
@@tiagomartins553 incase you still need help just enter postgres as username and what ever your password is. took me like an hour to figure out. Wish the tutorial guy mentioned about it
The world benefits from your lessons sir, I am a colleague of yours. I am very proud to spend time learning from you. Thank you for this course, and I appreciate so much this is free. I will stay in touch with your channel from now on. Free is not useless, free is heartful. Thank you very much for your work.
This is an EXCELLENT clear cut (and short) explanation of the basic structure for a Spring Boot project. Specially in the abstract parts, such as explaining dependency injection and the layering.
I’m not a huge fan of the tutorial so far because most of what you say is “do this, add this, then this, and that’s it” which doesn’t really teach anything. All it does is show that “hey I finished doing a project”. Instead you should explain why certain annotations are placed there, where in the documentation you found them, and how you can validate if it’s the right thing to do.
Exactly... I know that we must search things on our own but if this is a tutorial and not a presentation of a project then it has to provide the basics. And it's not doing it.
Yo Bro, your explanation is pretty good but please give links to application.properties etc files in the description. i tried all your links most are your code links, even Initialzr file link was not there. i did google and get ur github and stuff but please add it in future courses.
Probably the best Spring Boot video I have ever seen. Your courses will definitely be one of the best on each platform. Thanks a lot Amigo for this great video.
Thank you for your time in making & sharing this video. Your instructions are well organized and structured that is super easy to follow and learn. Very impressive 👏🏼👏🏼👏🏼 that I can’t leave without subscribing.
By far , this is the best Spring Boot course on youtube , if only it has to manipulate and get/display data into HTML pages not just back-end purely keep up the good work
Thanks for the tutorials bro, I really enjoy watching them. Just, one thing I want to add in the section when you explain about creating and connecting with database, it would be nice to mention that we also need to add dependency for postgres driver into our pom.xml file. org.postgresql postgresql runtime Thanks a lot!
NOTE: For anyone who have already got a database with some data and watching this video (43:05) , change spring.jpa.hibernate.ddl-auto to "update" will solve ' table "Student" exists ' error.
! For those who are having the problem with establishing the connection to the Postgres server. Inside the application.properties file, the username and the password, you need to type exactly like the one you created in the PostgreSQL server, i mean the default username and your default password that they requries you when you install Postgres. Then run again, you will see that you have the same console print out like Nelson. Otherwise, you will get "drop database student if exist" and then another error "Unable to open JDBC Connection for DDL execution". To make it short, whatever account you have in PostgreSQL, you need to type in the exact credential of that account for IntelliJ
I try to find but i can't. Do you know how to check username and password? I try everything and nothing works. As i know I did't set any username and password, also i have only one role - postgresql
@@tadeuszpaprocki8378 ok i will show you, you can try to re-install postgresql again(delete it and install again), because i also could not find my password as well. So here is how, you reinstall postgresql, then: - When they ask password, type in your own - they ask port number, just leave it 5432 or you can choose something else - they ask server after port number, i live in Vietnam so i select Vietnamese Finally, they will ask you about Stack Builder, you need to install one more driver which is the database driver, choose the "pgJDBC" and then install it. This driver helps you to connect Postgresql with Java Language Then try connect Postgresql and IntelliJ again, it will work.
@@tadeuszpaprocki8378 About the role, after you have installed postgresql and set up password,port number, server, like finish the installation phase i mean. PostgreSQL will give you 1 default Super Admin, which is the "postgres" user. So thats why you only found 1 role. To continue like in the video, you need to search google find a way to create a user
Also if you are on ubuntu, then there is apparently no password for the default postgres user created, therefore run ALTER USER postgres PASSWORD 'root'; in the psql client to set password to 'root'.
Had to complete a project within a short period and which requires me to apply this framework. Already searched for spring boot tutorial all over the Internet but this tutorial, this tutorial is a lifesaver. This is by far the shortest yet comprehensive spring boot tutorial and it is easy for those who are very new to spring boot to follow along and at the same time, want to get grasp of the basic quickly. I cannot see a reason to not subscribe to this channel. Kudos to Amigoscode 🙌
If anyone has difficulty connecting to the db again at around 1:02:13, i couldn't initially figure out why, but then i realized i had opened a connection to the db with db browser and psql in my terminal, which was preventing the server connecting the db port. After quitting those connections it works.
Man.. from all the forums online & the other RUclips videos out there, this one takes the cake. When I first watched a bit of this video, I noticed I did not understand any of the terms used, mainly because I did not understand the purpose of the annotations (everything with @ in the vid). I took a few days to look up what the most important ones do & now I can watch this video & basically fully understand what's going on. It's only so complicating. This is one of my very few breakthroughs, only so long until I go back to imposter syndrome, lol. Thanks so much for this video! Truly helped me.
Let me start by saying these videos are incredible and generally very accurate which saves so much time. I will absolutely be watching your videos for the unforeseeable future. That being said, I have an issue with updating where I use the exact same code but get a status 400, error: Bad Request, message: Required request body is missing. Does anyone know what I may have done wrong or is this a change that perhaps someone can guide me through? Thank you!
31:50 You can instead add @Autowired over the StudentService declaration and you dont actually need the controller Constructor, 1:02:00 i use H2 Database instead and in this case after i got all the students inside the StudentService i did a foreach which had Period.Between code, students.forEach((s) -> s.setAge(Period.between(s.getDate_Of_Birth(), LocalDate.now()).getYears())); also i used Lombok will automatically adds setters and getters to save a bit of time. 1:06:20 i use vs code which has "thunder client" which is a built in postman type tool
I'll watch this course as soon as I'm available. I also watched your old course about Spring Boot and it was amazing. Pretty sure this is amazing too. THANK YOU IN ADVANCE.
This is the best course by far for spring boot I found after some weeks looking at different ones. Nice work, I learned a lot of basics. Thank you for the course!!
Perfect teaching. Thanks for your effort. We saw this lesson our boot camp for 4 days but you give me this knowledge in 2 hours more than this course. The only question is ı don't know about spring boot and its methods,if you could teach us the international way and methods without too many comments and neutral this will be perfect.(I want to earn like this => my code can be work most of environments and system)If you already did these things no problem then. Thanks again!
The best course that exists. Thank you very much. I'll become a real programmer just because of you. Also please make more courses on popular frameworks and technologies :) It would be cool to have the 3rd version of that course, but where you show how to make controller (not the RestController) that returns html pages instead of json. I really want to make a whole site with a spring framework.
43:00 If You had some issues with starting application (exits with error "Error creating bean with name 'entityManagerFactory' defined in class path resource...") You might need to create new user, give him all privileges to student DB and enter his username and password in application.properties file, here are the commands: CREATE USER username WITH ENCRYPTED PASSWORD 'password'; GRANT ALL PRIVILEGES ON DATABASE student TO username; and put two extra lines in application.properties: spring.datasource.username=username spring.datasource.password=password This helped to me
The video doesn't explain much. you dont explain why we use different annotations and all. It just seemed like a promotional video for the other courses you have.
for example : there is no deep explanation about dependency injection and why we use it and all. It's just a do that, do this, download this database video.
First, I just wanna say congratulations for the crash course. It was awesome and very well executed. Second, I wanna thank you for providing the content for free. And last, do you have the courses on Udemy as well?
What an amazing tutorial. Great Work. One thing that I have noticed, however, is that you don't even need to have the `age` variable in your `Student` class. You can simply have a public method called `getAge()` that calculates and returns an integer, and it will be added to your JSON as `age`.
Great tutorial! I am new to SpringBoot and this course provided a good foundation of Spring Web Framework using a simple REST API and also a good overview of additional things like (e.g. Spring JPA) required to master SpringBoot.
At around 43:00, when I try to run a code, I get a PSQLException saying that "the server requested password-based authentication, but no password was provided". Could you please help me with how to fix this?
Thanks to Sanjana I solved it. There is an empty spring.datasource.username= spring.datasource.password= in the application.properties file. changing it to spring.datasource.username=MYUSERNAME spring.datasource.password=MYPASSWORD solved it for me
@Amigoscode there seems to be something borked here, at 52:43 I get a null pointer exception, debugging the code, seems that spring @Autowired is not injecting the StudentRepository into the studentRepository field inside the StudentService class. I followed the tutorial to the T, and getting this message. I see it works in your vid, but cannot replicate the same when I try. When the studentService.getStudents() method is executed, it calls on on the studentRepository.findAll() but the studentRepository is null and cannot execute .findAll() method. I did annotate the StudentService constructor with @Autowired. From what I can tell is the .findAll() method is executed before the StudentRepostory is injected. I doubt that Nelson will see this comment, but curious on the issue.
i didn't even compile for me , an error says there is an incompatibility in studentRepository.findall() and what i did is imorted java.util.* instead of com.sun.tools.javac.util.List;
This is such a very straightforward and informative tutorial about Springboot! I have background with Java OOP and an average background in restful services, Fast API, Laravel, Django and have used Android Room as well and your tutorial allowed me to kick start my journey into Spring Boot development! Thanks a lot!
I met this amazing guy just 2 days before Eid day 2k22. I didn't want to bother his privacy as he was with his family. He looked genuine as always. May Allah bless you
🎯 Key Takeaways for quick navigation: 00:00 *🚀 Introduction to Spring Boot Course* - Overview of the course structure and content. - Explanation of the importance and popularity of Spring Boot. - Encouragement to subscribe, join the community, and practice along for better learning. 02:19 *🔍 Features and Advantages of Spring Boot* - Spring Boot's versatility for building various types of applications. - Highlights of Spring Boot's features, including security, logging, database connectivity, and metrics. - Emphasis on its beginner-friendly nature and production readiness. 03:42 *🎓 Setting up a Spring Boot Project with Dependencies* - Overview of setting up a Spring Boot project using Spring Initializr. - Guidance on selecting project metadata, dependencies, and packaging. - Detailed demonstration of selecting dependencies for web development and database connectivity. 08:02 *💻 Setting up IntelliJ IDEA for Spring Boot Development* - Introduction to IntelliJ IDEA as the preferred IDE for Spring Boot development. - Recommendation of JetBrains Toolbox for managing IDEs. - Instructions for opening and setting up a Spring Boot project in IntelliJ IDEA. 10:28 *🚀 Running and Debugging a Spring Boot Application* - Demonstration of starting and debugging a Spring Boot application in IntelliJ IDEA. - Troubleshooting common errors, such as database connection issues. - Explanation of the application startup process and interpreting logs. 14:17 *🌐 Implementing RESTful Endpoints in Spring Boot* - Introduction to building RESTful APIs in Spring Boot. - Explanation of creating a simple API endpoint and testing it using a web browser. - Demonstrating how to return JSON responses from the API. 18:23 *📚 Modeling Data and Structuring the Application* - Guidance on structuring a Spring Boot application according to the API, service, and data access layers. - Demonstration of creating a model class (Student) to represent data entities. - Introduction to creating a service class (StudentService) for business logic handling. 24:25 *⚙️ Implementing Service Layer for Business Logic* - Creation of a service class (StudentService) to manage business logic related to students. - Transition of API methods from the controller to the service layer. - Explanation of the separation of concerns between the API and service layers. 27:53 *📊 Setting Up Data Access Layer for Database Operations* - Introduction to creating a data access layer for database operations. - Demonstration of moving methods from the service to the data access layer. - Explanation of the flow of data between the API, service, and data access layers. 28:52 *🏗️ Setting Up Dependency Injection and Annotations* - Implementing dependency injection using `@Autowired` annotation. - Declaring a class as a Spring bean using `@Component` annotation. - Distinguishing between `@Component` and more specific annotations like `@Service`. 32:44 *🗃️ Configuring and Connecting to a Real Database* - Configuring application.properties for database connection. - Installing and setting up PostgreSQL for local development. - Creating a new database and granting privileges to users. 39:26 *🔄 Mapping Entities to Database Tables with Spring Data JPA* - Using `@Entity` and `@Table` annotations to map Java classes to database tables. - Defining primary keys with `@Id` and `@GeneratedValue` annotations. - Understanding the magic of Spring Data JPA repositories for database operations. 47:44 *📊 Implementing Data Access Layer with Spring Data JPA* - Creating repository interfaces that extend `JpaRepository` for database operations. - Utilizing Spring's `@Configuration` and `@Bean` annotations for configuration and bean creation. - Saving data to the database using repository methods like `saveAll()`. 58:47 *🛠️ Implementing Transient Field for Calculating Age* - Utilizing `@Transient` annotation to exclude a field from database columns. - Removing the "age" field from constructors and ensuring its exclusion from database operations. - Implementing logic within the entity class to calculate age based on the date of birth. 01:03:13 *📝 Implementing POST Request to Save Students* - Creating a POST endpoint to add new students to the database. - Mapping JSON payload to a Java object using Spring's `@RequestBody` annotation. - Invoking service layer methods to save the student entity. 01:08:08 *🔄 Implementing Logic to Check Existing Email before Saving* - Defining a custom repository method to check for existing email. - Handling the scenario where the email already exists with appropriate exception handling. - Saving the student entity only if the email is unique. 01:15:47 *🗑️ Implementing DELETE Method for Removing Students* - Creating a DELETE endpoint to remove students from the database by ID. - Verifying the existence of the student before deletion to avoid errors. - Handling successful deletion and non-existent student scenarios. 01:21:47 *🛠️ Implementing PUT Method for Updating Student Details* - Designing a PUT endpoint to update student information, such as name and email. - Employing Spring's `@Transactional` annotation for automatic entity management. - Updating entity fields based on provided parameters while ensuring data integrity. 01:27:50 *🧪 Testing in Spring Boot* - Understanding testing fundamentals including assertions and mocking. - Exploring the importance of unit testing, integration testing, and test-driven development (TDD). - Learning how to test external services like Stripe without connecting to real systems. 01:29:48 *📦 Building and Running Spring Boot Application* - Cleaning the project with Maven and generating a JAR file. - Demonstrating the process of running the application from the generated JAR file. - Exploring how to run multiple instances of the application on different ports. 01:34:59 *📚 Concluding Remarks and Future Topics* - Summarizing the Spring Boot tutorial and inviting feedback. - Previewing future tutorial topics, including creating a registration service and incorporating Spring Security. Made with HARPA AI
43:05 I ran into a problem that i could resolve so thought i share it here. When i tried to create a student using jpa like you did it just wouldn't run the command and the solution for me was in your application.properties file, that i had to add an additional line to run the SQL: spring.jpa.generate-ddl = true I don't know why it fixed it and why it worked for you without the line but if anyone else has this problem, try to add it. Other than that very nice tutorial, loving it!
Some problems i've faced while following this tutorial (im coding on windows)=> if the "psql" command is not working, add it to the environment variables "SYSTEM PATH" and it should be working fine ive accidentaly imported the wrong "List" class so i was getting cannot resolve "method ""of" in list. Import the correct List class to avoid this problem. If you're using intellij community edition the database sidebar is not visible, you have to upgrade it to the ultimate edition. hope i was helpful to the beginners who are starting out.
I think that what you demonstrated in the the dependency injection part of the video, at min 29:08, is not really a dependency injection but only an example of inversion of control. My reason is that it's still tightly coupled and we can't change the service with another unless we change the code in the controller directly; which doesn't adhere to the definition of dependency injection as a SOLID principle. Thank you for the good work!
This full course can be found here: amigoscode.com/p/spring-boot
OTHER RECOMMENDED COURSES
► Java Essentials - amigoscode.com/p/java-essentials
► Spring Data JPA - amigoscode.com/p/spring-data-jpa
► Software Testing - amigoscode.com/p/software-testing
Happy coding
Hey Amigos very nice videos you have. I want to build an ecommerce website with backend what should i do? I am a starting developer, i know java, html, css, javascript for now. Love to hear from you !! keep up the good work
Walekum asalam
GOD bless you man, you're a great teacher.
Alhamdulillah 🙏 🙏
Thank you bro u are a life saver .
Hey Amigos! Pls make a course integrating SPRING BOOT with MONGO DB
Because of your videos I got an internship at a company here in Brazil. Thank you very much for all the knowledge transmitted,
i wish you all the best my friend.
Congrats! Proud of you :)
Me ajuda a conseguir também, por favor, me passa os passos necessários? And congratulations for your conquist!
@@KadekBr pegue um stack que o mercado gosta como Spring Boot + Angular e estude bastante. Arrume bem sua página do LinkedIn com essas informações e você vai ficar sabendo de processos seletivos pra vagas.
É preciso também dominar aspectos como dbs relacionais e não relacionais, autenticação, autorização, versionamento com git e outros. Firebase também é muito bem-vindo.
@@BrunoidGames obg pelo seu tempo, eu tenho algumas dessas habilidades já, tenho tb python, pascal, eletrônica, programação em C para Arduino. Estou tentando ficar mais experiente, a eu tb tenho habilidades matemáticas pois estou na metade do curso de Física. E somente não me dedico mais pela falta de tempo que a faculdade me consome.
@@KadekBr fera demais, irmão. Formei em física ano passado pela UnB e sei o quanto nos consome. Boa sorte no curso e na carreira! Tmj.
For those who still get a White label error page after 16:00, change '@GetMapping()' to '@GetMapping("/")' and it should display the page normally
Thank you bro.
Thank you so much!
Thank you!!
thx!
Thank you!
You condensed about a third of what I learned over a 6 month boot camp into an hour and a half. I'm doing a refresher for a technical evaluation with a client. This is quality that so many tutorials on RUclips just can't reach. Thank you!
You're lucky you were even taught this framework. My college just said, build your endpoints with springboot
I appreciate the time you put into this video!
I have to say this class is EXCELLENT. Simple enough to not get lost but powerful enough with clear explanations to show case things quickly
If you're missing Database tool window shown in 44:30, it's probably because you have IntelliJ Community Version. Only paid version of IntelliJ has access to that Database window. The alternative would be to use 3rd party database tools:
1. Go to View
2. Settings
3. Plugins
4. Type Database Browser and install it
5. Restart ide
Now in tools - windows - Database Browser you can do almost the same thing but 3rd party one is kinda limited
Thank you!! 😄
Thanks.
there is no Database Browser...
@@kexell Go for "Database Navigator"
@@kexell Plugin name is Database Navigator
Your english is very easy for brazilians to understand. At least in my opinion. Thank you for the awesome course!
O "Amigos" do nome me fez até pensar que era BR
Verdade
@@viniciusguimaraes117 What are the prerequisites for this course I know core java and Mysql is it enough ?
@@deepakgowda742 Yes dude. It's enough. This course requires basic java knowledge. Keep on trying and practicing, and you'll learn, I'm sure. ;)
@@deepakgowda742 This channel have SQL courses, to complete your studies.
There aren't many Spring Boot courses out there. Thank you Nelson for making the former possible!
You're very welcome Ben. I always look forward to see your comments.
Agreed
@Abigail Jones V
Bro do we need to learn spring MVC at first or can I start from spring boot without knowing spring MVC.
@@reddaboinavasista4166 No
Masha Allah. Watched till 32:00 minutes, and I am loving it. Great and Simple Explaination. Thank you Brother. May Allah Bless you.
ive never actually studied Spring Boot and found this clip but honestly i got overwhelmed lol
i got surprised with that ppl here say its easy to follow. i feel like i need to have more foundational knowledge first and come back to this video.
It does require some knowledge of the concepts, in which Spring Boot uses though. Did you comeback and find it helpful now?
Amigos Code is so flipping under rated. This guy is really good
Been using this tutorial to practice for a Spring job interview. I will update you all if I succeed 🤞🏿
All the best man!
did you????
Did you succeed?
I think he didn't, because he said: "I will update if I SUCCEED"
Same here :) we're going to get it done my man!
This is the best tutorial for Spring boot. I just wish Nelson really left the promised links in the description of the video. Other than that, thanks for a great lesson Amigo!
This guy is a lifesaver! He manages to compress a ton of knowledge into a short, informative video.
And the best part? It's completely free.
You learn a valuable skill, then you can use that knowledge to your advantage in the future.
The least I can do is like the video, subscribe to his channel, and share it with a friend who would also benefit from this knowledge.
Thanks a lot man! You do make a difference!
Hi Nelson.
I'm an experienced dev in many areas, but not in Spring Boot and JPA. I had frustrations trying to learn these from services like Udemy.
But I found this course to be well paced, well presented, clear in voice and clear in content, and it's the first one I've got all the way through! I'll pick up the JPA course next.
Thank you for this super content.
But can I make one suggestion to make it even better? When teaching "getting started" courses, I think it's best to start with free tools. So I would suggest perhaps using either IntelliJ community, or something like VS Code. I used the latter, succesfully. Using a £399/year tool for a getting-started course isn't ideal.
Similarly, I would have shown the API calls being made in the free version of Postman.
Everything else was bang on though, so thank you.
Totally agree, Udemy is always out of date
Nothing he did in the video really requires IntelliJ Ultimate. I used IntelliJ Community to follow along.
As for VSCode, while I like using text and compile from the command-line, I think it's going to get into the way of the tutorial if he has to keep building from the command-line every time. By using an IDE, he gets rid of all the unnecessary work that can distract from the content and focuses only on Spring Boot. Plus IntelliJ helps A LOOT when it comes to importing the correct classes, so you don't have to keep looking at what classes he is importing, you can just let IntelliJ do that for you.
@@CoreDump451 I think the Database Tools and SQL plugin requires IntelliJ Ultimate. Do you know how to connect to a database in Community Edition?
I don't use to comment on youtube videos but this time I would like to thank you for sharing your knowledge in a great and understand way. Thanks a million from Spain!
I am 4 years android developer experience with fintech company you can't imagine how smoothly I understand this course.
I cant thank you with simple words sir. First All thanks deserves Allah then you, thank you from the bottom of my heart you really change my programming world sir.
This tutorial didn't dissapointed.Thankyou AmigosCode
Can you explain more why you are putting the code in each class and the data flow of what is supposed to happen. What data gets passed where otherwise it gets confusing as you dont know where to start. (Need more concepts as said in your other video)
This youtube channel is seriously underrated.
Your tutorial helped wrapping my head around dependency injection in Spring Boot. Thank you so much! A lot of the information one can find out there is outdated and no longer works, but yours worked like a charm!
for those who don't get a table generated around 41:00 it helped to configure a name for the table by adding @Table(name = "students")
at first I didn't see this, added the code you suggested, stop and restarted the server- still didn't see the table. Then I refreshed the database with the icon found once you click open the database tab, and it showed
This is the best introduction course on Spring Boot that I've come across. Thank you Nelson for enlightening the world
I haven't seen any spring course as helpful as this! Absolutely fantastic!
wa Alaaikom Assalam brother,
Thank you so much for your time and for the effort that you have put in this course,
As, a python Guy, i found your course very interesting and informative.
Thank you again
May Allah bless you!
Amazing content! جَزاكَ اللهُ خَـيْراً
For anyone who has trouble getting the JSON to display at the API Layer section of the video, try adding:
"@ComponentScan(basePackageClasses = StudentController.class" in the line immediately after "@SpringBootApplication" in the "DemoApplication.java" file.
Thank you so much! I was confused because it was not showing anything
You saved my life dude.
Thanks buddy. I was banging my head for almost half an hour on what is wrong 😂
I legit love the fact that youve sliced all the info into easily consumable chunks.
This is pure developer gold, I can't even tell you how much these tutorials help. As to learn or refresh knowledge this is great material. Keep it up.
Once again, I'm so glad this youtube channel exists. Thank you
Thank you very much. Jazaka Allah khayran
جزاك الله خيراً
May Allah reward you bountifully
I'm from Colombia, and I understood everthing about this course, thank you Nelson, for take the time to explain this kind of stuff :D
This is so helpful and a super-easy introduction to Spring Boot! Had to figure out Postgres on my own because I'm on Windows, but it was pretty much smooth sailing after that. I'm looking to get back into software engineering after taking 3 years off and you're making my life much easier.
Thank you Nelson for the course!
how u did it? im blocked there please
@@tiagomartins553 incase you still need help just enter postgres as username and what ever your password is. took me like an hour to figure out. Wish the tutorial guy mentioned about it
@@emmanuelu Thanks, you saved me a bunch of time.
The world benefits from your lessons sir, I am a colleague of yours. I am very proud to spend time learning from you. Thank you for this course, and I appreciate so much this is free. I will stay in touch with your channel from now on. Free is not useless, free is heartful. Thank you very much for your work.
This is an EXCELLENT clear cut (and short) explanation of the basic structure for a Spring Boot project. Specially in the abstract parts, such as explaining dependency injection and the layering.
I’m not a huge fan of the tutorial so far because most of what you say is “do this, add this, then this, and that’s it” which doesn’t really teach anything. All it does is show that “hey I finished doing a project”. Instead you should explain why certain annotations are placed there, where in the documentation you found them, and how you can validate if it’s the right thing to do.
Exactly... I know that we must search things on our own but if this is a tutorial and not a presentation of a project then it has to provide the basics. And it's not doing it.
Well I think it depends on the audience. If its addressing general annotations for CRUD operations for beginners it has served the purpose
Yeah unfortunately the tutorial leaves a lot to be desired.
This is not for absolute beginners.
@@TechwithKB yes.. Ur exactly right
Yo Bro, your explanation is pretty good but please give links to application.properties etc files in the description. i tried all your links most are your code links, even Initialzr file link was not there. i did google and get ur github and stuff but please add it in future courses.
yea its confusing to dont have a possibility to have a look in source code , but thanks for a great course
Probably the best Spring Boot video I have ever seen. Your courses will definitely be one of the best on each platform. Thanks a lot Amigo for this great video.
Thank you for your time in making & sharing this video. Your instructions are well organized and structured that is super easy to follow and learn. Very impressive 👏🏼👏🏼👏🏼 that I can’t leave without subscribing.
By far , this is the best Spring Boot course on youtube ,
if only it has to manipulate and get/display data into HTML pages not just back-end purely
keep up the good work
hi, i want to begin this tutorial and i wanna know which version of java you used ? can i use any one ?
@@soufianebarki1551 IMO, it's always recommended to choose an LTS version of Java
Thanks for the tutorials bro, I really enjoy watching them. Just, one thing I want to add in the section when you explain about creating and connecting with database, it would be nice to mention that we also need to add dependency for postgres driver into our pom.xml file.
org.postgresql
postgresql
runtime
Thanks a lot!
Hi Georgie, the dependency for postgres driver is present in pom.xml see video again 9:49
The best Spring Boot tutorial on RUclips!! I had been working on my course project, and this is super clear and helpful!!
I can just say "THANK YOUUUUUUUUU"
NOTE: For anyone who have already got a database with some data and watching this video (43:05) , change spring.jpa.hibernate.ddl-auto to "update" will solve ' table "Student" exists ' error.
he didn't add hibernate as dependency though
Saved my life, many thanks!
I tried many videos but no proper result but yours is the good tank you
You're like a personal trainer for coders. Well done!
! For those who are having the problem with establishing the connection to the Postgres server. Inside the application.properties file, the username and the password, you need to type exactly like the one you created in the PostgreSQL server, i mean the default username and your default password that they requries you when you install Postgres. Then run again, you will see that you have the same console print out like Nelson. Otherwise, you will get "drop database student if exist" and then another error "Unable to open JDBC Connection for DDL execution".
To make it short, whatever account you have in PostgreSQL, you need to type in the exact credential of that account for IntelliJ
I try to find but i can't. Do you know how to check username and password? I try everything and nothing works. As i know I did't set any username and password, also i have only one role - postgresql
@@tadeuszpaprocki8378 ok i will show you, you can try to re-install postgresql again(delete it and install again), because i also could not find my password as well. So here is how, you reinstall postgresql, then:
- When they ask password, type in your own
- they ask port number, just leave it 5432 or you can choose something else
- they ask server after port number, i live in Vietnam so i select Vietnamese
Finally, they will ask you about Stack Builder, you need to install one more driver which is the database driver, choose the "pgJDBC" and then install it. This driver helps you to connect Postgresql with Java Language
Then try connect Postgresql and IntelliJ again, it will work.
@@tadeuszpaprocki8378 About the role, after you have installed postgresql and set up password,port number, server, like finish the installation phase i mean. PostgreSQL will give you 1 default Super Admin, which is the "postgres" user. So thats why you only found 1 role. To continue like in the video, you need to search google find a way to create a user
Also if you are on ubuntu, then there is apparently no password for the default postgres user created, therefore run ALTER USER postgres PASSWORD 'root'; in the psql client to set password to 'root'.
For me, I just restarted my pc and it started to work again.
Excellent work explaining Spring Boot to rookies! Highly appreciated!
Had to complete a project within a short period and which requires me to apply this framework. Already searched for spring boot tutorial all over the Internet but this tutorial, this tutorial is a lifesaver. This is by far the shortest yet comprehensive spring boot tutorial and it is easy for those who are very new to spring boot to follow along and at the same time, want to get grasp of the basic quickly. I cannot see a reason to not subscribe to this channel. Kudos to Amigoscode 🙌
The best Spring tutorial available. Thanks!
Really appreciate that you've put so much of hardwork in this video and provided it to us for free
One of the best Spring Boot tutorials. Well done!!!
If anyone has difficulty connecting to the db again at around 1:02:13, i couldn't initially figure out why, but then i realized i had opened a connection to the db with db browser and psql in my terminal, which was preventing the server connecting the db port. After quitting those connections it works.
Man.. from all the forums online & the other RUclips videos out there, this one takes the cake.
When I first watched a bit of this video, I noticed I did not understand any of the terms used, mainly because I did not understand the purpose of the annotations (everything with @ in the vid). I took a few days to look up what the most important ones do & now I can watch this video & basically fully understand what's going on. It's only so complicating.
This is one of my very few breakthroughs, only so long until I go back to imposter syndrome, lol.
Thanks so much for this video! Truly helped me.
Always giving us great content. Thank you, Nelson. Could you please make a course on Apache Kafka?
Would love to see Kafka in action as well! thanks for raising that request
Hi, I get lost in the MyShell part, How can I sett up the Postgres DB in Windows? 37:08
Let me start by saying these videos are incredible and generally very accurate which saves so much time. I will absolutely be watching your videos for the unforeseeable future. That being said, I have an issue with updating where I use the exact same code but get a status 400, error: Bad Request, message: Required request body is missing. Does anyone know what I may have done wrong or is this a change that perhaps someone can guide me through? Thank you!
same issues
31:50
You can instead add @Autowired over the StudentService declaration and you dont actually need the controller Constructor,
1:02:00 i use H2 Database instead and in this case after i got all the students inside the StudentService i did a foreach which had Period.Between code,
students.forEach((s) -> s.setAge(Period.between(s.getDate_Of_Birth(), LocalDate.now()).getYears()));
also i used Lombok will automatically adds setters and getters to save a bit of time.
1:06:20 i use vs code which has "thunder client" which is a built in postman type tool
in 1:06:20 I can't open http client in intelliJ, pls teach me how.
You are a superb teacher! Will do other courses with you.
Thanks!!
I'll watch this course as soon as I'm available. I also watched your old course about Spring Boot and it was amazing. Pretty sure this is amazing too. THANK YOU IN ADVANCE.
thanks
Hi, I only have a question. What is the command you used in minute 1:06:33?
This is the best course by far for spring boot I found after some weeks looking at different ones. Nice work, I learned a lot of basics. Thank you for the course!!
Thank you, man! Greetings from Brazil!
Perfect teaching. Thanks for your effort. We saw this lesson our boot camp for 4 days but you give me this knowledge in 2 hours more than this course. The only question is ı don't know about spring boot and its methods,if you could teach us the international way and methods without too many comments and neutral this will be perfect.(I want to earn like this => my code can be work most of environments and system)If you already did these things no problem then. Thanks again!
The best course that exists. Thank you very much. I'll become a real programmer just because of you.
Also please make more courses on popular frameworks and technologies :)
It would be cool to have the 3rd version of that course, but where you show how to make controller (not the RestController) that returns html pages instead of json. I really want to make a whole site with a spring framework.
Thanks AmigosCode!!!
We're waiting for Spring Cloud! :)
Simple but concise and a definitive go-to video for anyone who wants to crack a Java, Springboot interview in the shortest time.
You are the best in explaining details. Your content is 10/10 man. I used to think java is hard to understand its so easy by following your content.
43:00
If You had some issues with starting application (exits with error "Error creating bean with name 'entityManagerFactory' defined in class path resource...")
You might need to create new user, give him all privileges to student DB and enter his username and password in application.properties file, here are the commands:
CREATE USER username WITH ENCRYPTED PASSWORD 'password';
GRANT ALL PRIVILEGES ON DATABASE student TO username;
and put two extra lines in application.properties:
spring.datasource.username=username
spring.datasource.password=password
This helped to me
Thank you!! I've been stuck on this one for an hour
You're awesome thank you!
Im a year late, but thank u ur the goat
The video doesn't explain much. you dont explain why we use different annotations and all. It just seemed like a promotional video for the other courses you have.
for example : there is no deep explanation about dependency injection and why we use it and all. It's just a do that, do this, download this database video.
First, I just wanna say congratulations for the crash course. It was awesome and very well executed. Second, I wanna thank you for providing the content for free. And last, do you have the courses on Udemy as well?
he has is own website where free and not free courses are available
What an amazing tutorial. Great Work. One thing that I have noticed, however, is that you don't even need to have the `age` variable in your `Student` class. You can simply have a public method called `getAge()` that calculates and returns an integer, and it will be added to your JSON as `age`.
Great tutorial! I am new to SpringBoot and this course provided a good foundation of Spring Web Framework using a simple REST API and also a good overview of additional things like (e.g. Spring JPA) required to master SpringBoot.
At around 43:00, when I try to run a code, I get a PSQLException saying that "the server requested password-based authentication, but no password was provided". Could you please help me with how to fix this?
I am also getting the same exact exception despite doing everything exactly the same as in the video, I now have no way to proceed
@@ryanwhitman7698 hey i have the same issue , did you find a solution for this?
@@ryanwhitman7698 hey figured the solution (user and password fields have to be filled in your application.properties file )
Thanks to Sanjana I solved it.
There is an empty
spring.datasource.username=
spring.datasource.password=
in the application.properties file.
changing it to
spring.datasource.username=MYUSERNAME
spring.datasource.password=MYPASSWORD
solved it for me
i have a issue also in this part but it doesn't show me create table and the rest , do you have any solution
@Amigoscode there seems to be something borked here, at 52:43 I get a null pointer exception, debugging the code, seems that spring @Autowired is not injecting the StudentRepository into the studentRepository field inside the StudentService class. I followed the tutorial to the T, and getting this message. I see it works in your vid, but cannot replicate the same when I try.
When the studentService.getStudents() method is executed, it calls on on the studentRepository.findAll() but the studentRepository is null and cannot execute .findAll() method. I did annotate the StudentService constructor with @Autowired. From what I can tell is the .findAll() method is executed before the StudentRepostory is injected.
I doubt that Nelson will see this comment, but curious on the issue.
i didn't even compile for me , an error says there is an incompatibility in studentRepository.findall()
and what i did is imorted java.util.* instead of com.sun.tools.javac.util.List;
I am also facing the same issue in my code, did you got the solution for this ?
it's resolved for me. I have not given the default constructor in the model class because of which I was facing the problem
Man, This course is amazing!!! It's a full course, with a lot of usefull information and you explane all very good. I love it!
This is such a very straightforward and informative tutorial about Springboot! I have background with Java OOP and an average background in restful services, Fast API, Laravel, Django and have used Android Room as well and your tutorial allowed me to kick start my journey into Spring Boot development! Thanks a lot!
This guy has really helped me alot ...His English is so clear , Explaination is so detailed for all all level programmers...Bravo Nelson 👌
I met this amazing guy just 2 days before Eid day 2k22.
I didn't want to bother his privacy as he was with his family. He looked genuine as always. May Allah bless you
not so good, not explaining many things, just coding without saying why
Thanks a lot for this video course.
Excellent! to the point, short, simple and clear explanation. This is what I expect form courses.
🎯 Key Takeaways for quick navigation:
00:00 *🚀 Introduction to Spring Boot Course*
- Overview of the course structure and content.
- Explanation of the importance and popularity of Spring Boot.
- Encouragement to subscribe, join the community, and practice along for better learning.
02:19 *🔍 Features and Advantages of Spring Boot*
- Spring Boot's versatility for building various types of applications.
- Highlights of Spring Boot's features, including security, logging, database connectivity, and metrics.
- Emphasis on its beginner-friendly nature and production readiness.
03:42 *🎓 Setting up a Spring Boot Project with Dependencies*
- Overview of setting up a Spring Boot project using Spring Initializr.
- Guidance on selecting project metadata, dependencies, and packaging.
- Detailed demonstration of selecting dependencies for web development and database connectivity.
08:02 *💻 Setting up IntelliJ IDEA for Spring Boot Development*
- Introduction to IntelliJ IDEA as the preferred IDE for Spring Boot development.
- Recommendation of JetBrains Toolbox for managing IDEs.
- Instructions for opening and setting up a Spring Boot project in IntelliJ IDEA.
10:28 *🚀 Running and Debugging a Spring Boot Application*
- Demonstration of starting and debugging a Spring Boot application in IntelliJ IDEA.
- Troubleshooting common errors, such as database connection issues.
- Explanation of the application startup process and interpreting logs.
14:17 *🌐 Implementing RESTful Endpoints in Spring Boot*
- Introduction to building RESTful APIs in Spring Boot.
- Explanation of creating a simple API endpoint and testing it using a web browser.
- Demonstrating how to return JSON responses from the API.
18:23 *📚 Modeling Data and Structuring the Application*
- Guidance on structuring a Spring Boot application according to the API, service, and data access layers.
- Demonstration of creating a model class (Student) to represent data entities.
- Introduction to creating a service class (StudentService) for business logic handling.
24:25 *⚙️ Implementing Service Layer for Business Logic*
- Creation of a service class (StudentService) to manage business logic related to students.
- Transition of API methods from the controller to the service layer.
- Explanation of the separation of concerns between the API and service layers.
27:53 *📊 Setting Up Data Access Layer for Database Operations*
- Introduction to creating a data access layer for database operations.
- Demonstration of moving methods from the service to the data access layer.
- Explanation of the flow of data between the API, service, and data access layers.
28:52 *🏗️ Setting Up Dependency Injection and Annotations*
- Implementing dependency injection using `@Autowired` annotation.
- Declaring a class as a Spring bean using `@Component` annotation.
- Distinguishing between `@Component` and more specific annotations like `@Service`.
32:44 *🗃️ Configuring and Connecting to a Real Database*
- Configuring application.properties for database connection.
- Installing and setting up PostgreSQL for local development.
- Creating a new database and granting privileges to users.
39:26 *🔄 Mapping Entities to Database Tables with Spring Data JPA*
- Using `@Entity` and `@Table` annotations to map Java classes to database tables.
- Defining primary keys with `@Id` and `@GeneratedValue` annotations.
- Understanding the magic of Spring Data JPA repositories for database operations.
47:44 *📊 Implementing Data Access Layer with Spring Data JPA*
- Creating repository interfaces that extend `JpaRepository` for database operations.
- Utilizing Spring's `@Configuration` and `@Bean` annotations for configuration and bean creation.
- Saving data to the database using repository methods like `saveAll()`.
58:47 *🛠️ Implementing Transient Field for Calculating Age*
- Utilizing `@Transient` annotation to exclude a field from database columns.
- Removing the "age" field from constructors and ensuring its exclusion from database operations.
- Implementing logic within the entity class to calculate age based on the date of birth.
01:03:13 *📝 Implementing POST Request to Save Students*
- Creating a POST endpoint to add new students to the database.
- Mapping JSON payload to a Java object using Spring's `@RequestBody` annotation.
- Invoking service layer methods to save the student entity.
01:08:08 *🔄 Implementing Logic to Check Existing Email before Saving*
- Defining a custom repository method to check for existing email.
- Handling the scenario where the email already exists with appropriate exception handling.
- Saving the student entity only if the email is unique.
01:15:47 *🗑️ Implementing DELETE Method for Removing Students*
- Creating a DELETE endpoint to remove students from the database by ID.
- Verifying the existence of the student before deletion to avoid errors.
- Handling successful deletion and non-existent student scenarios.
01:21:47 *🛠️ Implementing PUT Method for Updating Student Details*
- Designing a PUT endpoint to update student information, such as name and email.
- Employing Spring's `@Transactional` annotation for automatic entity management.
- Updating entity fields based on provided parameters while ensuring data integrity.
01:27:50 *🧪 Testing in Spring Boot*
- Understanding testing fundamentals including assertions and mocking.
- Exploring the importance of unit testing, integration testing, and test-driven development (TDD).
- Learning how to test external services like Stripe without connecting to real systems.
01:29:48 *📦 Building and Running Spring Boot Application*
- Cleaning the project with Maven and generating a JAR file.
- Demonstrating the process of running the application from the generated JAR file.
- Exploring how to run multiple instances of the application on different ports.
01:34:59 *📚 Concluding Remarks and Future Topics*
- Summarizing the Spring Boot tutorial and inviting feedback.
- Previewing future tutorial topics, including creating a registration service and incorporating Spring Security.
Made with HARPA AI
Thank You So Much,
I have gone through yours Spring Data JPA & Spring Boot & created my 1st Spring Boot App
Nice Explanation🙂
Amazing course Amigoscode! I loved it and got a basic idea of Spring Boot!
hey can I add this tutorial in my resume as a project named student api
@@vitastasingh3682 create your own rest API service, consume it using some frontend and then add it to resume for better learning
You are a fantastic instructor, really like this course so far! I didn't realize how easy Spring Boot is until today...big thumbs up!!!
43:05 I ran into a problem that i could resolve so thought i share it here.
When i tried to create a student using jpa like you did it just wouldn't run the command and the solution for me was in your application.properties file, that i had to add an additional line to run the SQL:
spring.jpa.generate-ddl = true
I don't know why it fixed it and why it worked for you without the line but if anyone else has this problem, try to add it. Other than that very nice tutorial, loving it!
Helpline📲📥⬆️
Question can come in⬆️
oh my god I've been looking through all the comments for something to resolve my issue and you solved it thank you so much
thanks for the comment, my table didn't want to get generated without this line
This is my official fresh start to learn Springboot. Thank you Amigos Code! Thank you brother Nelson. Greet from Indonesia! Assalamu'alaikum
I watched the whole video. It is really helpful for brushing up my springboot skill.thank you Amigoscode❤
This is awesome, thank you for this tutorial ..
Coming from .NET. Now learning Spring Boot in 2024. Thanks for the course.
I must admit this is the best Spring boot tutorial hands down. I had an easy time following this tutorial and enjoyed every single bit of it.
Loved the video mate! Thank you very much! Been wanting to learn about Spring and this has been super straigt forward and very clear.
This course was excellent, well-structured and very well explained. Thank you!
Some problems i've faced while following this tutorial (im coding on windows)=>
if the "psql" command is not working, add it to the environment variables "SYSTEM PATH" and it should be working fine
ive accidentaly imported the wrong "List" class so i was getting cannot resolve "method ""of" in list. Import the correct List class to avoid this problem.
If you're using intellij community edition the database sidebar is not visible, you have to upgrade it to the ultimate edition.
hope i was helpful to the beginners who are starting out.
You are so talented and so clearly explained. A huge thank you to you!
I think that what you demonstrated in the the dependency injection part of the video, at min 29:08, is not really a dependency injection but only an example of inversion of control. My reason is that it's still tightly coupled and we can't change the service with another unless we change the code in the controller directly; which doesn't adhere to the definition of dependency injection as a SOLID principle. Thank you for the good work!
hey can I add this tutorial in my resume as a project named student api
@@vitastasingh3682 wrong comment my friend, I am not the owner of this course material.