Spring Boot Rest API CRUD Example using JPA,MYSQL and Postman | (HINDI) | Learn in 1 Hrs Guarantee
HTML-код
- Опубликовано: 23 янв 2023
- Hello and Welcome to Our RUclips channel "Code Myth".
📌𝗧𝗼𝗽𝗶𝗰 𝗖𝗼𝘃𝗲𝗿𝗲𝗱 𝗶𝗻 𝘁𝗵𝗶𝘀 𝘃𝗶𝗱𝗲𝗼:
In this tutorial, we will learn about :
In this tutorial, we’re gonna build a Spring Boot Rest CRUD API example with Maven that use Spring Data JPA to interact with MySQL/PostgreSQL database. You’ll know:
1.How to configure Spring Data, JPA, Hibernate to work with Database
2.How to define Data Models and Repository interfaces
3.Way to create Spring Rest Controller to process HTTP requests
4.Way to use Spring Data JPA to interact with PostgreSQL/MySQL Database
For more details watch the complete video.
LIKE | COMMENT | SHARE | SUBSCRIBE
So to see how we can achieve all the above functionality, do watch this video.
𝐅𝐨𝐫 𝐌𝐨𝐫𝐞 𝐚𝐦𝐚𝐳𝐢𝐧𝐠 𝐜𝐨𝐧𝐭𝐞𝐧𝐭 𝐃𝐨 𝐜𝐡𝐞𝐜𝐤𝐨𝐮𝐭 𝐛𝐞𝐥𝐨𝐰 𝐩𝐥𝐚𝐲𝐥𝐢𝐬𝐭.
↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
📌𝗝𝗮𝘃𝗮 𝐈𝐧𝐭𝐞𝐫𝐯𝐢𝐞𝐰 𝐐𝐮𝐞𝐬𝐭𝐢𝐨𝐧 𝐚𝐧𝐝 𝐀𝐧𝐬𝐰𝐞𝐫𝐬 𝗣𝗹𝗮𝘆𝗹𝗶𝘀𝘁 :
• JAVA Interview Questio...
📌𝗝𝗮𝘃𝗮 𝗧𝘂𝘁𝗼𝗿𝗶𝗮𝗹 𝗣𝗹𝗮𝘆𝗹𝗶𝘀𝘁 :
• Java Beginner :: What ...
📌𝗘𝘅𝗰𝗲𝗽𝘁𝗶𝗼𝗻 𝗛𝗮𝗻𝗱𝗹𝗶𝗻𝗴 𝗶𝗻 𝗝𝗮𝘃𝗮 𝗣𝗹𝗮𝘆𝗹𝗶𝘀𝘁 :
• Java Exception Handlin...
📌𝗡𝘂𝗺𝗽𝘆 𝗧𝘂𝘁𝗼𝗿𝗶𝗮𝗹 𝗣𝗹𝗮𝘆𝗹𝗶𝘀𝘁 :
• How To Install NumPy o...
📌𝗣𝘆𝘁𝗵𝗼𝗻 𝗧𝘂𝘁𝗼𝗿𝗶𝗮𝗹 𝗣𝗹𝗮𝘆𝗹𝗶𝘀𝘁 :
• How To Install Python ...
📌If you like my video please do like, share and subscribe to my RUclips channel.
Link : / codemyth
#codedecode #codewithharry #springboot #restapi #postman #springbootcrudapi
LIKE | COMMENT | SHARE | SUBSCRIBE
📌 𝕿𝖔𝖕𝖎𝖈 𝕽𝖊𝖑𝖆𝖙𝖊𝖉 𝖙𝖔 :
spring boot
spring boot rest api tutorial
spring boot in hindi
spring boot rest api
rest api
learn spring boot
how to create rest api in java using spring boot
spring boot tutorial
spring rest api
ava spring boot
spring framework
spring boot java
how to use spring boot
spring boot project
spring boot rest
netflix and spring boot
spring boot tutorial for beginners
spring boot crud
spring mvc
spring boot microservices
rest api spring boot
spring boot crud operation
spring boot crud operations with postman
spring boot crud operations with jsp
spring boot crud intellij
spring boot crud app
spring boot crud tutorial with intellij idea
spring boot crud operation using intellij
spring boot crud project in eclipse
rest api spring boot
rest api spring boot tutorial
Happy Learning !!! 🙂
Thanks for Watching :)
LIKE | COMMENT | SHARE | SUBSCRIBE
☕ If you want to buy a coffee for me and want to support me, then Super thanks is best option.
📥 Connect with me on Instagram : instagram.com/iamhj6.5/?hl=en
Advice : Please watch the video first so that you can learn a lot with the best explanation then check the source code.
Source code : github.com/CodeMythGit/EmployesAPICRUD
One of the best video on youtube to understand the CRUD concept...
Thank you so much 😊keep learning from CodeMyth
Watched so many videos, but you made it really easy Sir.
Great work!!!
Thank you so much.
Thanks for watching and giving feedback on it. 😁
This is main chapter asking in interview..very simply concept clear...thank you
Thank you so much that you liked my video. Please support me by other spring boot related interview questions.
🤗🤗
Thanks For Clearing My all Concepts about Crud Operations
You are most welcome and thank for watching my video. 🤗
This video is very helpful for understanding springBoot Rest API CRUD , Thanks for this video
You are most welcome 🤗
Hello bro , you're explanation is up to the mark, only thing concerning about this video is you are directly interacting with repository layer , you should have implemented the service interface for business logic.
Thank You !
Hello bro..
Thank you so much for your support.
In my latest video I am following this approach.
While creating this video my goal was to explain the concept but thank you for your suggestion. Will keep things separated.
wonderful, its really helpful for quick practice.
Great. 😊 do subscribe to my channel if you want to support me.
Thank you for watching😊
Awesome explanation of crud operation.....easy to clear concepts.
Thanks for watching. Do checkout other videos as well from Code myth channel. 🤗
Super sir next level concept clear ho gaya and also background music is peaceful to cool-down the mind ❤make more video on like this concepts
Thank you.. microservices k upar amazing video lekar aa rha hu
your video is more informative and easy to understand. I like the way you are teaching before watching your video Rest Api concept was also tough for me.
Hello..
I am glad that my video helped you. 🤗🤗
If you are interested in learning other concepts please watch my other video as well on spring boot to support me.
I am here to provide great content for my RUclips family.
Is se behtreen video koi ho hi nhi sakti specially unke liye Jo beginners hain jinhe har chij scratch se samjhna ho bhai just awesome ❤
Thank you so much for awesome comments.keep learning from codemyth.or bhi video hai spring boot k upar jarur checkout kijiye or share bhi karke support dikhaiye.🤗😊
@@CodeMyth ji bilkul filhal Mai apne sare doubts apki hi videos dekh kr clear kr rhi hu I swear maja aa raha hai padhne me the way you make us understand is just fabulous please upload some videos of microservices also
I am in the process of making a micro services video. Thank you
Thankyou sir, you explained in a very good way. Keep Going!!!
Thank u..do checkout other videos available in the playlist ☺️
Really sir
Your explanation is very easy any person easily understand
Thank you so much for watching. 🤗
Learned a lot , thanks for the videos😊
Thanks for watching.. Your most welcome Prasad.. 😊
Don't forget to subscribe to the channel and watch other videos on spring boot and java concepts.
Thanks bro, the video was very informative and easy to understand. 👌👌👌👌👌👌
Most welcome.. Do checkout other videos as well in springboot playlists available on this channel. 🙂
Very well explained bhayya. Sach me hawa bana ke rakha hai rest api ko lekin apka video dekh ke simple lga 😅😅
Thank you brother.. mere channel k or bhi video hai spring boot k upar mast me bataya hu jarur dekhna.. 😉
@@CodeMyth say sister😅,... And right now am watching your spring boot video 😊☺
Great explanation 🤗
@apekshagourshete7227 sorry..my mistake sister
Excellent bro.... Very clear and short
Thanks for watching brother 😊
thank you ...Awesome explanation of crud operation.....easy to clear concepts.
1
Code Myth
Reply
Keep learning from CodeMyth. 😊 do checkout other video on spring boot on this channel.
Amazing 😍. Love this video well explained brother 🙏🏻
Thank u.. Channel ko subscribe nhi kiye ho abhi tak subscribe kardo.. spring security k upar bhi video course hai.
Learned a lot , thanks for the videos
Glad to hear 😊.
Thanks for watching😇
Thank you bahut accha explanation Diya hai🎉
Most welcome.
Or bhi video hai usse bhi jarur checkout kijiye.
I have just subscribed your channel and will share with my friends Your efforts should be appreciated
Thank you for supporting me.. Now I am going to make the best of the best content with an easy explanation.
😊😇
Thanks brother It was best video I created my student details backend application Thanks a lot
and your explanation so nice thanks again and keep going 😊😊
Ohh..you like my style of teaching.. Thank you so much 😊. Do checkout other playlists as well on springboot and java.
Thanks again for watching. 😊😇
Hii Sujal I also wanted to create can you please share source code
Easy and meaningful explanation thank you sir ,👍
Thank for watching 😊
More videos on the spring boot framework are on the way. So do subscribe and press the bell 🔔 notifications on.
Very clear and informative
Thanks a lot for watching my video and giving me feedback. 😊
Best content provided .I have laptop issue now listening from mobile sorry.
Its okay.. no problem... Thank for watching my video.
😊
Easily explained the CRUD operation....Its working for me without any errors.. 😃
It's really nice that you have successfully completed and implemented the code in first attempt.
Please do like share subscribe to Codemyth channel.
that inspired me to complete this video
Thanks for watching. Do support me by sharing this video with your friends.🤩
It's amazing The way you explained it will be very much easier for a beginner to grasp. 1 suggestion -> If you can use service layer as well that will be beneficial.
Thank you so much.. yes in my latest video I am using service layer as well. Do checkout other videos available on my channel.
Helped me a lot thank you brother
Thank u so much for watching my video.. Lots of amazing content are coming on this channel. DSA video are also available do check. 😊
Amazing Tutorial ❤
Thanks a lot for watching.. Please watch other videos 🤗 and DSA videos are also available.
very usefull video.. thank you bhai..make more videos on java..
Most welcome bhai.. 😊.. Yes bhai.. Or bhi Sare video aa rahe on alternate day basis or future me advance topic par bhi video aa rahe hai..
Thanks for watching 😇
U r a such a great and Herd working man 💯
make more videos on spring boot our support is with you...
keep it up man
Thank u so much for your amazing comment. Do checkout other videos available on my channel. 🤗
@@CodeMyth Bhai plz 1 video bana sakty ha jis ma dateTime post api k response ma Auto fatch hojaye or database ma b entry baith jaye.
payload ma dateTime pass na karay or Response ma fatch hojaye auto.
Your kind Response will be Appreciated thank
Keep up the good work. 🎉
Thanks for watching.. Do watch my other video as well to support me. 😊
Best explanation ever
Keep learning from CodeMyth. 🤗
Loved the video and simplicity or code... Thank you ❤ (a request.... please make a simple banking app)
I tried to find similar projects but nothing was helpful.
Thanks and keep making our life easy🔥
Noted. I will develop the banking app using spring boot.
Thanks for watching🤗
Every thing is working fine but data update hi nhi ho rha database me . Updated successfully ka message return hone ke bad bhi.... HELP kr do bhai
@RequestBody annotations miss to nhi kiye ho na post method se..
Ek baar check karlo Or hota hai to mene github ka link bhi diya hain comment me vo bhi dekh lo.. Kuchh missing rahega to correct karlo 😊
Thank you so much sir ❤
Thank u Suraj for watching my video.. dsa ka playlist bhi check karo bahut hi best content hai mere channel par. 🤗
I was struggling to understand spring, But he made it so simple. Great work bhai. Loved this video. Thanks for helping.
I am really happy that my video help you. I have lots of other content as well on spring boot and Java, please watch and support me by sharing with your friends and colleague.
🤗🤗
Thanku😊
Most welcome and thanks for watching.
Please watch DSA as well. That one is also best.
Love you bro ❤
Thanks for watching brother 🤗🫂
very nice sir
Thanks for watching 🤗🇮🇳
Awsome content👍
Thank you..do checkout my other video on spring boot and security..that one is also amazing. 🤗🥰
can you make a video on implement validation and login signup. and this video is very helpful. Thankyou
Most welcome. I have noted your request will definitely make video on this topic.
Thank for watching. 😊
You are very good. Look, but where can I find the other get methods with the city and ampAge parameter? It would be great to see them. Thks for all
Thanks for watching
bahot achhe se samjhaya hai
Spring boot k upar complete playlist h ish channel par jarur checkout kijiye 😊
@@CodeMyth kya mai eligible hu IT field ke liye Mera graduation 2011 me hua hai aur BA Kiya hu..
BA means bachelor of arts.. Am I correct?
@@CodeMyth ji
Yes bro.. Please refer below link.
www.simplilearn.com/top-career-options-after-b-a-article#:~:text=Become%20a%20Software%20Developer,the%20top%20software%20development%20courses.
Hello sir
While updating details like salary, age and City/ id @Put in post man it’s showing error like “Method Not Allowed”
Please check whether the controller class post method is correctly written or not and then also check in the postman you are using the method as post and not get.
Thanks for watching.
can you please tell like in general , how many layers does a springboot application have? like controller, service dao and all?
Hi Mayank,
Different layers are as follows:
1. Presentation layer used as a view
2. Business layers used for validation of data and some check
3. Persistence kayer used for storage logic where we write code to store the data in the database.
4. Database layer : where we store actual data.
I hope your doubt is cleared now.
Happy learning.
Code myth
@@CodeMyth thnx
Most welcome
how can i
join 2 table and just pick id of table A to use in table B?
Using join column functionality
Make a video for resttemplate to connect different microservices
Okay.. I will make
EmployerService class bhi honi chahiye thi, controller class service class se intereact krta
Haa bhai you are correct.. me ush time par bas concept ko samjhane k liye explain Kiya tha.. thank you for noticing.
Happy learning.
Hi bro while try to connect mysql by adding the properties in application.properties its not connecting to DB. How to connect it , i did all the things which u have done
Check whether MySQL services are running or not. And the dependency version is correct or not.
@@CodeMyth Dear sir you haven't mention the version of the MySQL driver , so please define it out , it is making many problems in the code
Can u make a video for login logout functionality with front end page?!!
Yea sure.. Why not.. It is already on my list.. Will upload the video soon..
Thanks for watching 🙂
When I deleted all employee ids and then try to POST one employee detail its employee id is not starting from 1
Hello Parag..
Sorry for the late reply
Here is the solution..
1. When you deleted all the employees from the table execute the query :
Alter table table_name AUTO_INCREMENT=1
2. Execute query :
Truncate table table_name;
url for searching city
Bro please make video on soap APIs
Definitely bro.. I will make video on this topic as well. Thanks for you suggestion. 🤗
Ek number bhau concepts karne ke liye .
Ek question hai-
Rest Api banne ke baad humko kya krana hoga ye code ko hai front wale developer ko dena ho kya?
Isko question ko thoda ka chota sa video banna ke bata na ki industry mai iska kya kya process hota hai
Aur java back-end wala ka industry ka pura kaam kya hota hai.
Aur bhai ye swagger ui kya hota wo bhi api hai kya?
Swagger UI Concept k liye mast video banaya hu
Link : ruclips.net/video/CZvjYOVMow4/видео.html
Other web services hamare service ko call kar Sakta hai and data process kar sakte bai.. Abhi Ham jaise postman use kar rhe hai.. Iska ka web app bhi banaya hu me
Ye vala video hai.. Web app k sath..
Link ruclips.net/video/tIJ9ZEi6GV8/видео.html
Is it postman and swagger is same
Thanku for the reply bro
Please make a video about how java back-end developer work in industrial level means which tool are required like jira ajax and flow of the work just like first we pull the project from the gitlab.
And bro please also make a video of gitlab
You explain very clearly but those all mapping methd and return type was littlebit confusing,can you please once explain
Thanks for watching the video.
Please refer to this video
Link : ruclips.net/video/tIJ9ZEi6GV8/видео.html
@@CodeMyth Thanks for the reply ,wil watching that one now ..
.Thank you once again
How to perform get operations in post man I'm getting error can u please help
I have performed the get operation as well in the video. Could you please check it once again.
Thanks for watching. 😊
Let me know if you still face the same issue.
Hi..when I add @RequestBody annotation...its giving 415 Unsupported Media Type error in Postman
Hello.. Did you check the postman.. What type of content you have selected from the drop down menu.. Go to post method and then select raw and then from the drop down select Json as dataype.. It will solve the problem..
Let me know.. If you still face the issue..
@@CodeMyth yes..its solved..thanks
ur video helped me lot
Sir, I have a doubt that you implemented the logic in Controller class only,how can we implement logic in Service class and then just call the methods in Controller class?
Hello..Thank you for your question.
Create a service interface with annotations @Service and autowired that service in your controller class and call the method of the service interface.
Note: You need to have implementation class as well for that service interface where you will your logic of that method.
I hope you understand.😊
@@CodeMyth thank you so much sir for explanation,you're the best teacher for spring boot out there!
Most welcome..do checkout my other videos available on my channel. 😊
Bhaiya ek video bnao jisme mapping ka concept b add kro
One-to-one,one to many, many to many 🙏🙏🙏🙏🙏
Thik hai..mene note kar liya hai..Video bana dunga 😊
Do checkout other videos as well on spring boot and security courses
Jaise aap bta re maine baisa hi kiya h lekin muje error aa rhe h sir please help me
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL "alter table employee add column emp_id bigint not null auto_increment" via JDBC [Incorrect table definition; there can be only one auto column and it must be defined as a key]
at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:94) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.applySqlString(AbstractSchemaMigrator.java:574) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.applySqlStrings(AbstractSchemaMigrator.java:514) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.migrateTable(AbstractSchemaMigrator.java:333) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
at org.hibernate.tool.schema.internal.GroupedSchemaMigratorImpl.performTablesMigration(GroupedSchemaMigratorImpl.java:84) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.performMigration(AbstractSchemaMigrator.java:232) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
at org.hibernate.tool.schema.internal.AbstractSchemaMigrator.doMigration(AbstractSchemaMigrator.java:117) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:286) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.lambda$process$5(SchemaManagementToolCoordinator.java:145) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
at java.base/java.util.HashMap.forEach(HashMap.java:1429) ~[na:na]
at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:142) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
at org.hibernate.boot.internal.SessionFactoryObserverForSchemaExport.sessionFactoryCreated(SessionFactoryObserverForSchemaExport.java:37) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
at org.hibernate.internal.SessionFactoryObserverChain.sessionFactoryCreated(SessionFactoryObserverChain.java:35) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
at org.hibernate.internal.SessionFactoryImpl.(SessionFactoryImpl.java:315) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:450) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:1507) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:75) ~[spring-orm-6.1.4.jar:6.1.4]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:388) ~[spring-orm-6.1.4.jar:6.1.4]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.buildNativeEntityManagerFactory(AbstractEntityManagerFactoryBean.java:409) ~[spring-orm-6.1.4.jar:6.1.4]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:396) ~[spring-orm-6.1.4.jar:6.1.4]
at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.afterPropertiesSet(LocalContainerEntityManagerFactoryBean.java:364) ~[spring-orm-6.1.4.jar:6.1.4]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1833) ~[spring-beans-6.1.4.jar:6.1.4]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1782) ~[spring-beans-6.1.4.jar:6.1.4]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:600) ~[spring-beans-6.1.4.jar:6.1.4]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522) ~[spring-beans-6.1.4.jar:6.1.4]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:325) ~[spring-beans-6.1.4.jar:6.1.4]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-6.1.4.jar:6.1.4]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:323) ~[spring-beans-6.1.4.jar:6.1.4]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-6.1.4.jar:6.1.4]
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1231) ~[spring-context-6.1.4.jar:6.1.4]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:949) ~[spring-context-6.1.4.jar:6.1.4]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:624) ~[spring-context-6.1.4.jar:6.1.4]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146) ~[spring-boot-3.2.3.jar:3.2.3]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) ~[spring-boot-3.2.3.jar:3.2.3]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456) ~[spring-boot-3.2.3.jar:3.2.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:334) ~[spring-boot-3.2.3.jar:3.2.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1354) ~[spring-boot-3.2.3.jar:3.2.3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343) ~[spring-boot-3.2.3.jar:3.2.3]
at com.raj.CrudApp.CrudAppApplication.main(CrudAppApplication.java:10) ~[classes/:na]
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:580) ~[na:na]
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:50) ~[spring-boot-devtools-3.2.3.jar:3.2.3]
Caused by: java.sql.SQLSyntaxErrorException: Incorrect table definition; there can be only one auto column and it must be defined as a key
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:121) ~[mysql-connector-j-8.0.33.jar:8.0.33]
at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[mysql-connector-j-8.0.33.jar:8.0.33]
at com.mysql.cj.jdbc.StatementImpl.executeInternal(StatementImpl.java:763) ~[mysql-connector-j-8.0.33.jar:8.0.33]
at com.mysql.cj.jdbc.StatementImpl.execute(StatementImpl.java:648) ~[mysql-connector-j-8.0.33.jar:8.0.33]
at com.zaxxer.hikari.pool.ProxyStatement.execute(ProxyStatement.java:94) ~[HikariCP-5.0.1.jar:na]
at com.zaxxer.hikari.pool.HikariProxyStatement.execute(HikariProxyStatement.java) ~[HikariCP-5.0.1.jar:na]
at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:80) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]
... 41 common frames omitted
2024-02-29T11:27:18.879+05:30 INFO 16852 --- [Uplifters-Internship] [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2024-02-29T11:27:19.570+05:30 WARN 16852 --- [Uplifters-Internship] [ restartedMain] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning
2024-02-29T11:27:20.115+05:30 INFO 16852 --- [Uplifters-Internship] [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 35729
2024-02-29T11:27:20.168+05:30 INFO 16852 --- [Uplifters-Internship] [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port 8090 (http) with context path ''
2024-02-29T11:27:20.184+05:30 INFO 16852 --- [Uplifters-Internship] [ restartedMain] com.raj.CrudApp.CrudAppApplication : Started CrudAppApplication in 10.838 seconds (process running for 11.747)
Project...Started...
spring.application.name=Uplifters-Internship
server.port=8090
spring.datasource.url=jdbc:mysql://localhost:3306/ems?useSSL=false
spring.datasource.username=root
spring.datasource.password=Surishti@123
#creat,drop
spring.jpa.properties.hibernate.globally_identifiers=true
spring.jpa.hibernate.ddl-auto=create
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect
I am getting in postman as employee created in database but it is not getting reflected in the table
Please check the save logic or database details mentioned in the property file..whether you are doing that correctly Or not.
Thanks for watching.
Bhai ek baar apna database check karo connected hai ki nhi , kyoki mere mein bhi same problem aayi thi , fir bhi na hoye toh batana , sath mein pom.xml mein check kar lena tumne MySQL ka driver properly dala hai ki nhi , verna fir usko bhi dalna padega sahi sey
Brother I am add mysql connection dependency version is runtime but show me error
And add one more runtime dependency and show again same error
Could you please check my source code..I think you might be making some Minor mistake.let me know if you still have any issue.
try to explain it from scrach ... so that fresher will learn it .. im just having core java knowledge. want to learn it coz its a task for me in pro company
ruclips.net/video/o7v8TgNqkV4/видео.html refer this video
my application is not running, its getting build on STS but on postman its giving 404 error, can u help to resolve the issue
Hi.
There might be some typo error in the code.. Could you please compare your code with the code in the video.. And let me know if you still face issues.
Thanks for watching.
Here is the source code : github.com/CodeMythGit/EmployesAPICRUD
@@CodeMyth Having same 404 error and checked out all the typos at last copied your code but still in postman its showing error.
Sorry for the late reply.. Could you please checkout the source code and use the same as a fresh workspace.
war file app dale ki nahi tomcat mai
Hello.. Spring boot ka yhi fayda hai.. War file kahi dalne ki jarurat nhi.. Direct application use kar leta hai.. Because isme inbuilt tomcat server hota hai.
Thanks for watching
Sir...mera post karane pe data Null store ho raha hai mysql me or bar bar run karane pe port number change karana parr raha hai.
Sir kya problems ho sakta hai please help me 🙏🙏
Hello.. Application already kisi port par running hai for example 8080 par.. Pehle usse stop Karo and fir application ko start kro..
Database me value null ja rha hai q ki ek reason ho Sakta hai ki @RequestBody post method me object k pehle missing ho.. Please check that..
Keep learning from code myth. 🤗
where are the PutMapping examples solution,which u gave as homework?
Checkout this link.
github.com/CodeMythGit/EmployesAPICRUD/blob/main/EmployesAPICRUD/src/main/java/com/codemyth/controller/EmployeeController.java
Is service class not required?
Service class is required just to make the code more structured. And we can seperate the logic.
Thanks for watching.
Thanks sir,one requwst please dont add background music.Sir please make a real time spring boot project using spring io.thanks
Noted your suggestion Deep.. 🙂 Sorry for the background music.
Could you please elaborate which kind of real time project you want.
Thanks for watching.
@@CodeMyth Thanks sir,Sir for example e commerce site shoppng cart.we can know the implementation of spring boot.or any small project .
Okay.. I will make it for sure.
hello Sir,
Can you please tell me how to retrieve one column by id.. jaisa ki apne btaya tha video ki last main assigment hai.. app code de skte ho?
Hello.. Here you can find the code.
github.com/CodeMythGit/EmployesAPICRUD/blob/main/EmployesAPICRUD/src/main/java/com/codemyth/controller/EmployeeController.java
Check last two method.
@@CodeMyth thank you so much sir
Can you make a video of registration login with spring security usi g thymleaf
Yes.. Here is the video..
ruclips.net/video/cSWHtMUffAc/видео.html
Best video with best explanation.
Do like share and subscribe.
Most welcome🎉
Only spring framework full video post cheyy bro
Thank you brother.. Please watch springs boot interview part 1 and 2 as well. It will help you very much.
Please koi sts project based videos bnao sir , 0 to hero , 🙏
Jaise ki kuchh suggests karo.. Mera Spring Boot ka playlist hai vo ek baar check karlo.. Usme bhi hai content iske related. 😊
How to explain spring boot project please make video in interview
Sure.. This weekend i will make video on this topic.
Thanks for watching.
Hello..
Video created and uploaded on this channel.
Link : ruclips.net/video/xo5dZ8NyAak/видео.html
why I am not able to find pom.xml file?
Hello..
It is there.. Please go inside first folder for the GitHub link. 😊
If we use mybatis can you give me
You need lecture on spring boot Rest API using mybatis right .
Please do crud operation in spring boot for image and pdf file with joong different table , Using login signup for different roles
Thanks for your suggestion. I have noted your request and will create a video in future. Keep learning from Codemyth channel.🤗
Thankx for reply......crud by joining table
Make videos as soon as possible on that.....please inform me.....
Check this video on my channel.
ruclips.net/video/S3ztYrsCbuQ/видео.html
Image , table joining
I have communication link failure
How to solve
hello.. Could you share the exact error message.
Thank you for watching👀. 😊
Bhai mujhhe dto use karna hai aur kya hota hai aur kaise implement karna hai ispe ek video bana sakte ho kya?
DTO basically Ham tab use karte hai jab response me sensitive data nhi chahte dena. To uske liye dto class file create karenge or only required data hi set karke usse response me bhejenge.
@@CodeMyth thank you Bhai quicj response Dene ke liye. Aur meri shubhkamnaye hai aapko ki aapka channel jyada grow kar sake. Aur ek meri request hai dto pe ek video banao....with practical
Can you explain Patch also?
Yes sure.. I will cover this part as well. In the upcoming video.
Thanks for watching
Sir how to create UI for the crud operation
Video is already created..
Link : ruclips.net/video/tIJ9ZEi6GV8/видео.html
End to end concepts are covered in this video..
where is the service class?
And why am I getting "Internal Server Error" even after following the process. Can anyone help
Is your application are getting started
no problem in the main code, but localhost:3001 not responding
I've changed the port to 3001
By default the port is 8080 so u can use that one as well.
I hope your application are running fine. 😊
I can't post the values through postman, showing
status: 500
error: internal server error
path:api/employees
What if I don't want to update the salary ?. I am trying this. But salary becomes ZERO. I don't want to update the salary. How can we do this anyone can help with this?
If you don't want to update the salary..then the object that you fetch based on id..on that object keep the salary as it is and update the rest of the value from the request and save the object.this will solve your problem.🤗
@@CodeMythsuppose I am passing different parameters from postman. Sometimes I passed only name. Sometimes I passed name and age. I want only the value updated which I have passed. Rest of the value should be the same. How can I do this ?
Bro make a video by using h2 database
Here is the link: ruclips.net/video/UdB-8NQRHr8/видео.html
@@CodeMyth thank you so much 😊
it's a request to make a small project .rather than crud n all
That is also coming in future 😇. Thanks for watching and sharing suggestions.
Bro kindly provide github links for these projects
It is available in one of the comments bro. Please check. 😁
can you pls provide the code git link?
GitHub Link : github.com/CodeMythGit/EmployesAPICRUD
@@CodeMyth ty so much very clear explanation
Your valuable feedback means a lot to me.. 😇 i am happy you like my Explanation.
Nice par dialect url clear nahi dikhide raha hai
Thank you.. sorry for the inconvenience.. could you please check the spring boot video from the playlist there you will find your solution.🙂🤗
can you give link of mysql driver cause getting error in communication link failure
Hello Raj,
I think you are asking for dependency.
You can run the application without mysql sql driver by using H2 database.
Check the below link.
Please check this source code link : github.com/CodeMythGit/EmployesAPICRUD
Using H2 database : ruclips.net/video/UdB-8NQRHr8/видео.html
Thanks for watching.
@@CodeMyth actually I am getting error like communication link failed
Checkout this link brother:
stackoverflow.com/questions/6865538/solving-a-communications-link-failure-with-jdbc-and-mysql
@@CodeMyth thanks sir I ll check it
Bro
Yes bro.. I hope you liked my video.
Bhai Post request work nahi kar raha hai help karo na
Kya issue aa rha hai.. Comment kar do yha par
Bro last 2 operations ka code bhejo na please
Yes it is there bro.. You can find the in GitHub repository. In pinned comment the link of source code is present.
Thanks for watching.
Bhai error aa rha haii Postman me 404 while using postmapping ?
Method me issue hoga.. Ek baar jo http method use kar rhe hoge.. Vo check karlo
Sb kuch same hai bhai Lekin still getting same error
Bahut hi minor mistake ho rha hoga bhai.. Ek baar step by step.. Check karloge.. Malum pad jayga.. Starting se.. Like controller proper hai ki nhi.. Annotations sab proper place par hai ki nhi or http method jo use kar rahe ho vo correct hai ki nhi.. 🙂
Issue issue solved ho jayega
Hello bhai..
Please check this source code link : github.com/CodeMythGit/EmployesAPICRUD
Thank you so much bhaiya 🤍 keep growing
I'm facing problem in postman it gives me error...... Please help me anyone
Hello..
What error message you are getting. Please send it here. So that i can suggest something.
@@CodeMyth Everything is working expect postman phase.
1.Could you please check whether the method and url is correct or not ?
2. Check what type of data you are sending through Postman. It should be json.
These are a few points that need to be checked
try to remove bgm next time.
Actually it was the very start of my RUclips channel so the background music is a little bit higher. But thank you for watching and giving feedback.
bc mast video thank u
Thank you bolne ka tarika thoda casual hai 😀
@@CodeMyth😂😂 didn’t expected a reply 🤦🏻
405 error a rha hai postman me...
Content type wrong bhej rahe hoge.. Json format select karna hai.. Body k content type ko.. Isse solve ho jayega.. Let me know if you still face the issue.
Thanks for watching
github.com/CodeMythGit/EmployesAPICRUD
Sir where to find ....findBycity and findById??
Hello.. It's is a assignment and it is there in video as well.. Let me know if you can't find it in video and GitHub repo.
Sir couldn't find please help ....I have interview tommorow....
github.com/CodeMythGit/EmployesAPICRUD/blob/main/EmployesAPICRUD/src/main/java/com/codemyth/controller/EmployeeController.java
In this file we have the code.. To getById and get employees by city
@@CodeMyth thank you very much sir
You are welcome. Do watch other videos on spring boot and interview related and share with friends and colleagues.
Thanks for watching.
plz pura project ka code bhejo na
Sorry for the late reply.. Could you check the GitHub repository mentioned in the about section.. There you can find the code.,😊
github.com/CodeMythGit/EmployesAPICRUD
U wrote you are using java 8 but used java 17? Why
Yes.. We can use java 17 as well. There will be no issue. Springboot handles it automatically and downloads the required java version from the maven Repository.
@@CodeMythnot can! You are using 17 in this project. You can't use any version lessthen 17 with current sprong boot
We can use java 8 or higher versions with spring boot.
@@CodeMyth can but with spring boot 2.5.x version. You may need to make a video with java 8/11 how can someone use spring boot with
Ok