Spring Boot CRUD Operations with MySQL using IntelliJ IDEA | CRUD Operation using REST API in Java

  Рет қаралды 163,214

Java Guides

Java Guides

Күн бұрын

Пікірлер
@vamsikrishnaodela2639
@vamsikrishnaodela2639 2 ай бұрын
🎯 Key points for quick navigation: 00:00:00 *🚀 Introduction to Spring Boot CRUD Project with IntelliJ IDEA* - Overview of creating a Spring Boot CRUD application, - Using IntelliJ IDEA, MySQL, and Postman for development and testing, - Utilizing Spring Data JPA and Hibernate for the repository layer. 00:01:24 *🛠️ Setting up Project with Spring Initializr* - Using Spring Initializr to create a Spring Boot project, - Selecting Maven project, Java language, and Spring Boot version 2.5.5, - Adding necessary dependencies: Spring Web, Spring Data JPA, MySQL JDBC driver, and Lombok. 00:05:05 *⚙️ Importing and Configuring the Project in IntelliJ IDEA* - Importing the project into IntelliJ IDEA, - Setting up package structure: model, controller, repository, and exception packages, - Configuring MySQL database connection in `application.properties`. 00:07:01 *🗃️ Database Setup and Entity Creation* - Creating a database in MySQL server, - Configuring database connection properties, - Creating a JPA entity for the `Employee` table with Lombok annotations and entity mappings. 00:16:06 *📊 Employee Repository and Custom Exception* - Creating Spring Data JPA repository for CRUD operations, - Implementing a `ResourceNotFoundException` for handling non-existent records, - Using `@ResponseStatus` to manage HTTP response status. 00:19:56 *🧩 Developing REST Controller for CRUD Operations* - Building REST endpoints for `Employee` operations, - Implementing GET endpoint to retrieve all employees, - Testing GET request using Postman and outlining request mappings. 00:25:08 *✨ Creating and Testing Add Employee API* - Developing POST request handler to add a new employee, - Setting up and using Postman to send POST requests with JSON payload, - Validating functionality by adding records to the database. 00:30:22 *📦 Fetching Objects from Database* - Discusses the procedure to retrieve an employee object using the `findById` method, - Explains handling a scenario where a record with a specific ID doesn't exist using a custom exception, - Demonstrates how to return a response entity upon successful data retrieval. 00:33:27 *🛠️ Testing Get Employee API* - Shows how to use Postman to test the GET API endpoint, - Explains passing an employee ID in the URL to fetch data, - Validates the response to confirm API functionality. 00:34:25 *🔄 Building Update Employee API* - Details the creation of an update method using response entity, - Describes fetching, updating, and saving employee data, - Introduces the PUT mapping annotation for updating resources. 00:40:38 *🧪 Testing Update Employee API* - Demonstrates using Postman for testing the update employee API, - Illustrates updating employee details and validating the response, - Shows how to ensure data consistency post-update with a GET call. 00:43:23 *🗑️ Building Delete Employee API* - Explains the process of creating a delete employee method, - Provides a check for employee existence before deletion, - Discusses returning no content status upon successful deletion. 00:46:12 *🧹 Testing Delete Employee API* - Describes testing the DELETE API using Postman, - Highlights verifying deletion through a GET request check, - Confirms successful deletion with HTTP status code 204. Made with HARPA AI
@JavaGuides
@JavaGuides 3 жыл бұрын
Guys, Intellij idea is great IDE so go ahead and use free community addition for building spring boot projects. If you are new Intellij idea then check out intellij idea playlist on this channel.
@funcoding1797
@funcoding1797 3 жыл бұрын
IntellijIDEA Ultimate Edition is much more attractive and better, especially in the field of completing the codes .. with a lot of plugins e.g Codota as well SST or eclipse and is free for one year...😍 Tnx a lot bro... you're the best...
@jagadeesh8751
@jagadeesh8751 3 жыл бұрын
bro, In my code , compiler complains ResourceNotFoundException is not handled. you didnot used "throws" keyword in getById method. how it is working for you bro ??
@nml4546
@nml4546 2 жыл бұрын
Very good was I got past the database problem. For some reason, building the project from the downloaded Springboot zip file, I could not get past a database problem. I spent a couple of days researching and trying things to no avail. I finally decided tp build the project in the traditional manner, i,e, from scratch (but including SpringInitializer) and the needed dependencies. Then I just followed the view and everything worked as expected.
@neeraj91mathur
@neeraj91mathur 8 ай бұрын
Very crisp and to the point tutorial. Great job brother, this was helpful 👍
@pkmkb-69
@pkmkb-69 7 ай бұрын
How to update this in XAMPP any idea? I mean how to update tables in XAMPP after fetching APIs
@shamsularefinsajib7778
@shamsularefinsajib7778 Жыл бұрын
Thanks so much, I am new to java spring boot, i found it useful
@Lboards130
@Lboards130 Жыл бұрын
Thanks for the clip, it was very helpful.
@karunakarverma
@karunakarverma 3 жыл бұрын
You are awesome 😎 you created lifetime reference.
@BKYADAV-zm7yv
@BKYADAV-zm7yv 2 жыл бұрын
Huge respect from my side sir ❤️
@dadasajad8741
@dadasajad8741 2 жыл бұрын
amazing work brother. thank you very much!
@paulovinicius9940
@paulovinicius9940 3 жыл бұрын
Very good as always!
@fsoldierdeth
@fsoldierdeth Жыл бұрын
love u man, thank u for that it really helped me a lot believe me
@Malarselvi.M
@Malarselvi.M Жыл бұрын
Jii this is amazing learning video.. I expect you to do project in intellij idea and postman and the outputs in excel..Hope you see back in the next video with what I expect before 😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊😊
@kushek3208
@kushek3208 10 ай бұрын
Very useful video thanks a lot🙏
@pylypiukantonio2215
@pylypiukantonio2215 Жыл бұрын
Thank you.Helped me a lot
@brayannkouam9097
@brayannkouam9097 Жыл бұрын
than you master .well explained tutorial your are a boss
@dgonx017_
@dgonx017_ 2 жыл бұрын
Best tutorial, new sub
@jagadeesh8751
@jagadeesh8751 3 жыл бұрын
very clear. thanks broooooooo
@gariktadevosyan764
@gariktadevosyan764 2 жыл бұрын
Thank you bro, very helpful.
@feminaazmi3753
@feminaazmi3753 2 жыл бұрын
Really helpful. Thank You :)
@karthikravikumar-cq6df
@karthikravikumar-cq6df Жыл бұрын
the best of all
@samuelquentacarvajal9910
@samuelquentacarvajal9910 3 жыл бұрын
very good :) "saludos desde bolivia "
@tanmay.k8525
@tanmay.k8525 Жыл бұрын
Wow, thanks dude.
@sachkosachbolnagalathhaiky9938
@sachkosachbolnagalathhaiky9938 Жыл бұрын
thank you brother amazing
@utkarshguruji8894
@utkarshguruji8894 9 ай бұрын
33:16 --> at line number 33 when I used Long instead of long , it is giving 404 error . Can anyone explain why ?
@janithsahasra3971
@janithsahasra3971 2 жыл бұрын
thanks a log it's really helpfull
@makarikevin
@makarikevin 2 жыл бұрын
Great tutorial
@thaminduKavinda
@thaminduKavinda Жыл бұрын
Thanks for the video
@mistermiaumiau2134
@mistermiaumiau2134 10 ай бұрын
very good video!
@rahuldubey1724
@rahuldubey1724 2 жыл бұрын
24:58 bro mera sara values that is first name, last name and email id sb null show kr rha hai..please help
@Musfimurshadi
@Musfimurshadi 11 ай бұрын
very good
@dineshsv4186
@dineshsv4186 3 жыл бұрын
Thank you its working
@Azure-d8d
@Azure-d8d 11 ай бұрын
Thankyou bro❤
@abinayaelangovan8585
@abinayaelangovan8585 2 жыл бұрын
ResourceNotFoundException is not working.. even in the demo shown in video, the customised error message is not getting printed
@anantpratapsingh9067
@anantpratapsingh9067 2 жыл бұрын
at 8:29 you printed spring.datasource.url , from where we can get this link and all other syntax ?
@subamsarkar_
@subamsarkar_ 2 жыл бұрын
You can find that in his Github Repo
@anantpratapsingh9067
@anantpratapsingh9067 2 жыл бұрын
@@subamsarkar_ धन्यवाद भाई ।
@subamsarkar_
@subamsarkar_ 2 жыл бұрын
@@anantpratapsingh9067 Bhai are you able to build the project ? I am half way through the video. Did everything same. No error in the console but table is not getting created.
@anantpratapsingh9067
@anantpratapsingh9067 2 жыл бұрын
@@subamsarkar_ आपने jpa dependency add किया था
@anantpratapsingh9067
@anantpratapsingh9067 2 жыл бұрын
किया ही होगा नहीं तो error आ जाता
@subamsarkar_
@subamsarkar_ 2 жыл бұрын
Hi @Java Guides. I am not able to create the table. I did same coding as shown. And I am not getting any error in the build console. But the table is not getting created. I also changed the mysql dialect to my local MySQL version.
@little-by-little-one-trave1770
@little-by-little-one-trave1770 2 жыл бұрын
Hi any solution I am also facing the same issue. I am using mysql 8.
@little-by-little-one-trave1770
@little-by-little-one-trave1770 2 жыл бұрын
I used this it worked spring.jpa.hibernate.ddl-auto=update spring.datasource.url=jdbc:mysql://${MYSQL_HOST:localhost}:3306/ems spring.datasource.username=root spring.datasource.password=password spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.jpa.show-sql: true
@malfunkshungo
@malfunkshungo 2 жыл бұрын
@@little-by-little-one-trave1770 Thanks for the update. Mine also worked with this.
@adityacr7407
@adityacr7407 6 ай бұрын
​@@malfunkshungo mine is not working. Please help
@adityacr7407
@adityacr7407 6 ай бұрын
Done . thanks a lot
@soundharn8257
@soundharn8257 Жыл бұрын
While inserting data inro table employee 'Column name set 'is not listing the column names not listing in suggestions😢
@little-by-little-one-trave1770
@little-by-little-one-trave1770 2 жыл бұрын
Good video thanks. According to mysql convention table name should be singular.
@Musfimurshadi
@Musfimurshadi 11 ай бұрын
Can you please share 3 or 4 small project using OOPS concept, Springboot, Java legacy idea ? With explaination in your video please ? If you already have, can you leave the link as a reply here please?
@vinayakhorambali5463
@vinayakhorambali5463 2 жыл бұрын
hello i need a code for postmaping where if i have to save a data in my data base and if any of the field say "xyz" already exist in it then it should return me "field "xyz" already exists"... please help
@TechnicalYarana
@TechnicalYarana 5 ай бұрын
can i use this project in android studio
@ammaraziz5734
@ammaraziz5734 4 ай бұрын
Thank you.
@rickhunter8216
@rickhunter8216 Жыл бұрын
IF YOU ARE USING MYSQL DATABASE, SO YOU DON'T NEED HARDCODE WITH COMMAND RUNNER. IT CAN GENERATE CONFUSION.
@aniketdey8449
@aniketdey8449 Жыл бұрын
Didn't get you bro, can you explain. And are you able to create the table from the code?
@prajwalnakure
@prajwalnakure Жыл бұрын
Yes, once you create the createEmployee() method ...u don't need the Command Runner interface. You can safely delete that , or else it will generate those two employees whenever we run the main class.
@fookoboy9623
@fookoboy9623 2 жыл бұрын
if its showing web service is not started 8080 is busy then in application change the port number server.port=9090
@sajithsukumaran99
@sajithsukumaran99 3 жыл бұрын
The first two IDs are always repeating...do u know what might be the problem..? Pls suggest
@paulovinicius9940
@paulovinicius9940 3 жыл бұрын
You copied and forgot to change the values in the commandLine method.
@rickhunter8216
@rickhunter8216 Жыл бұрын
@@paulovinicius9940 CORRECT.
@andrejpetnuch2125
@andrejpetnuch2125 3 жыл бұрын
when i use @Entity in sringboot, table is not created. Where is the problem?
@maxime045
@maxime045 2 жыл бұрын
You configured the application.properties ?
@rickhunter8216
@rickhunter8216 Жыл бұрын
@@maxime045 THAT IS CORRECT.
@adityacr7407
@adityacr7407 6 ай бұрын
Can anyone help? Table is not created in my ems database
@mohamedamaan133
@mohamedamaan133 6 ай бұрын
Authentication required showing when testing via Postman. but i did correctly. can you give a solution. how to test it
@mohamedamaan133
@mohamedamaan133 6 ай бұрын
403 Forbidden
@AJEETKUMAR-dk2kv
@AJEETKUMAR-dk2kv 2 жыл бұрын
Hello sir, I'm using eclipse IDE for project....
@AJEETKUMAR-dk2kv
@AJEETKUMAR-dk2kv 2 жыл бұрын
I'm not able to run it on postman it's always showing error not found...
@AJEETKUMAR-dk2kv
@AJEETKUMAR-dk2kv 2 жыл бұрын
Do I need to link on MySQL before postman? Coz I haven't done yet...
@rickhunter8216
@rickhunter8216 Жыл бұрын
@@AJEETKUMAR-dk2kv YOU NEED CONFIGURE THE APPLICATION. PROPERTIES FILE AND TYPE THE MYSQL CONNECTION.
@sahilsharma8691
@sahilsharma8691 2 жыл бұрын
I am not getting the .set in list in employee.setFirstName(); What can I do?
@N7000nn
@N7000nn 2 жыл бұрын
You need to add lombock configuration in your Employee class. Above the class type @Setter and that works like setMethod of any field you have. The same goes for @Getter, @ToString etc..
@dilaragoral106
@dilaragoral106 2 жыл бұрын
best!!
@josephmctigue4494
@josephmctigue4494 Жыл бұрын
where is link to your finished code?
@arunpitchaimani7713
@arunpitchaimani7713 3 жыл бұрын
Please create spring boot and graphql playlist videos
@delightful730
@delightful730 2 жыл бұрын
please do with postgreseSql
@karthikk5278
@karthikk5278 3 жыл бұрын
Thank you
@reverseflash2800
@reverseflash2800 3 жыл бұрын
IntelliJ idea free version se kam chal jaayega yaa pro version required hai
@JavaGuides
@JavaGuides 3 жыл бұрын
free community edition version se kam chal jayega.
@rishimohan1408
@rishimohan1408 2 жыл бұрын
What does @crosaorigin annotation do?
@rickhunter8216
@rickhunter8216 Жыл бұрын
IT ALLOWS THAT GOOGLE CHROME OR MOZILLA OR EDGE DON'S BLOCK YOU WHEN YOU USE POSTMAN.
@UddhikaIshara
@UddhikaIshara Жыл бұрын
Thank you very much
@ravindrakawale5161
@ravindrakawale5161 3 жыл бұрын
can we create springboot project in intellij like eclipse
@rickhunter8216
@rickhunter8216 Жыл бұрын
SPRING TOOLS SUITE (STS) IS A ECLIPSE IDE FOR SPRING.
@yawamoako7811
@yawamoako7811 3 жыл бұрын
Great
@cdlijia
@cdlijia Жыл бұрын
学习了。
@remiimartinnn
@remiimartinnn 2 жыл бұрын
Thanks
@mariocs23
@mariocs23 2 жыл бұрын
King
@thabtiguenidi2960
@thabtiguenidi2960 Жыл бұрын
👍
@chandrasekar3992
@chandrasekar3992 Жыл бұрын
Text is very small, Can't see properly , It's wasting my time
@BinKonChuot
@BinKonChuot 9 ай бұрын
omg, dont write code that, A project need full have controller, service, repo and model, you not have service?
@JavaGuides
@JavaGuides 9 ай бұрын
OMG, you want controller, service, repository then watch another video: kzbin.info/www/bejne/r6rFgK2YhLGYnacsi=JrR5T1VmaKIkEM32
@yarik83men51
@yarik83men51 3 жыл бұрын
+++
@subratmishra91
@subratmishra91 2 жыл бұрын
java.lang.ClassCastException: class net.javaguides.springboot.model.Employee cannot be cast to class org.springframework.boot.context.properties.bind.BindResult (net.javaguides.springboot.model.Employee and org.springframework.boot.context.properties.bind.BindResult are in unnamed module of loader 'app')
@raja90rocks
@raja90rocks 2 жыл бұрын
Hi JavaGuides, employee.setFirstName , LastName , email - can't be added facing issues . how to solve ? import model.Employee; import repository.EmployeeRepository; @SpringBootApplication public class SpringbootBackendApplication implements CommandLineRunner{ public static void main(String[] args) { SpringApplication.run(SpringbootBackendApplication.class, args); } @Autowired private EmployeeRepository employeeRepository; @Override public void run(String... args) throws Exception { Employee employee=new Employee(); employee.setFirstName -----------------------------> faced issues can't set the value } }
@N7000nn
@N7000nn 2 жыл бұрын
You need to add lombock configuration in your Employee class. Above the class type @Setter and that works like setMethod of any field you have. The same goes for @Getter, @ToString etc..
@omkarkumbhar2001
@omkarkumbhar2001 Жыл бұрын
Thank You
How to Create Multi Module Maven Project in IntelliJ IDEA
14:08
Java Guides
Рет қаралды 34 М.
Thank you mommy 😊💝 #shorts
0:24
5-Minute Crafts HOUSE
Рет қаралды 33 МЛН
Who is More Stupid? #tiktok #sigmagirl #funny
0:27
CRAZY GREAPA
Рет қаралды 10 МЛН
진짜✅ 아님 가짜❌???
0:21
승비니 Seungbini
Рет қаралды 10 МЛН
Building web applications in Java with Spring Boot 3 - Tutorial
3:30:40
freeCodeCamp.org
Рет қаралды 754 М.
Microservices using SpringBoot | Full Example
1:21:39
Daily Code Buffer
Рет қаралды 1 МЛН
Spring Boot Tutorial | Full Course [2023] [NEW]
1:37:31
Amigoscode
Рет қаралды 2,9 МЛН
Thank you mommy 😊💝 #shorts
0:24
5-Minute Crafts HOUSE
Рет қаралды 33 МЛН