Это видео недоступно.
Сожалеем об этом.
Db configuration in application.properies file | JPA with Spring Boot | Spring boot tutorial
HTML-код
- Опубликовано: 16 авг 2020
- Db configuration in application.properies file | JPA with Spring Boot | Spring boot tutorial
#springboot #spring boot tutorial
Download Source Code: learncodewithd...
Spring-boot full playlist: • Spring Boot Tutorial i...
Spring MVC playlist: • Spring MVC Tutorial St...
Spring framework playlist: • Spring Framework Tutor...
MySQL in one video: • Learn MySQL in one vid...
Telegram Link for Doubt: t.me/learncode...
Important Videos:
➡️React JS with Project: • 🔥 🔥 Complete React Js ...
➡️Learn JDBC in one video: • JDBC Crash Course in 1...
➡️Learn Python in One Video: • Learn Python in One Vi...
➡️Learn HTML in one video: • Jquery in one video in...
➡️Learn HTML form in one video: • Jquery in one video in...
➡️Learn JavaScript in one videos: • Learn JavaScript in O...
➡️Learn Form Validation using javascript and jquery: • Form Validation using ...
➡️Learn CSS in one video: • Jquery in one video in...
➡️Jquery in one video: • Jquery in one video in...
➡️Kotlin is one video: • Kotlin | Learn Kotlin ...
➡️Complete Python Project - RUclips downloader in one video: • Jquery in one video in...
Important Playlist:
➡️Spring Boot Tutorial with Project : • Spring Boot Tutorial i...
➡️Spring MVC Tutorial: • Spring MVC Tutorial St...
➡️Complete Spring Framework Tutorial: • Spring Framework Tutor...
➡️Hibernate Tutorials: • Hibernate Tutorial for...
➡️E-Commerce Project using Java: • E-Commerce Project usi...
➡️AWS Free Java Hosting Playlist: • AWS Hosting Tutorial |...
➡️Hibernate Tutorial Playlist: • Hibernate Tutorial for...
➡️Learn Technology in One Vides: • Learn in one video : C...
➡️Programming Tips for Programmers: • Coding Tips and Discus...
➡️Complete Python for Beginners: • Complete Python Tutori...
➡️Important Python Projects: • Python Projects in Hindi
➡️Complete Servlet & JSP : • Servlet and Jsp (Serve...
➡️Complete JDBC ( Java Database Connectivity) : • JDBC(Java Database Con...
➡️Complete Java Project : TechBlog: • Full Java Advance Pro...
➡️Java Swing Projects: • Java Projects for begi...
➡️Java Core Concepts: • Java Core Tutorial
➡️Kya aap Jante hai Series: • kya app jante hai : s...
Important Links:
👉Official Website (Source Code): learncodewithd...
👉Telegram Discussion Group: t.me/learncode...
👉Follow me on Instagram: / durgesh_k_t
👉Follow on Facebook / learncodewithdurgesh
Gear that I use:
Gears that I Use:
Lenovo Ideapad S145 AMD Ryzen 5 15.6
amzn.to/33Vvxu2
Mic for Recording
amzn.to/305hgtr
amzn.to/2EyFMfa
Disclaimer:
All videos are for educational purposes and use them wisely. Any video may have a slight mistake, please take decisions based on your research. This video is not forcing anything on you.
Bhai tu khud ki videos ke neeche ke comments dekhta hai kya? 2 saal se bando ko error aa rakka hai and you haven't replied them. I thought of going for your paid course but bhai tu bass ek baar vdeo bana karr choor deta hai... Last 3 hours se ek hi error parr hoon jo common error hai bando ki comment section mein.
The reason spring boot framework is used because it saves much time and developer efforts , on the top of that you are using IDE's intellisense feature which means now you don't have to write even a single line as a whole. If we were capable of understanding at such speed then why we were here ?. Please try to cover broad topics also so that newbies know why and how things are working behind the scenes. Dileact ? Crud Repository ? Why that generic is used ?.
you only focus on writing business logic, is what the intentions of Spring Boot framework developers wanted to solve..
For Exception: "Bean not available" --> create only one package and put all the classes(pojo, main) and interface(UserRepository) inside that package (Forget about loose coupling for a bit and do that ). Update ur project and restart it again..try it
yes it's working Thanks.
i got this Exception.
Tanx a lot man ..i resolved my issue ...tq a lot
Thanks bro
for loose coupling how to do?
The method save(S) in the type CrudRepository is not applicable for the arguments (User)
Sir I have mysqlDialect problem.
I have tried many time but I can't resolve this problem.
i was facing same issue ..
Now i m using spring.hibernate.dialect=org.hibernate.dialect.MySQLDialect
spring.jpa.hibernate.ddl-auto=update
in Application.Properties file and the issue solved ..
i m able to get data in table
Got error
Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment] due to: Unable to resolve name [org.hibernate.dialect.MySQL5Dialect] as strategy [org.hibernate.dialect.Dialect]
Solution :
Remove that dialect property ( Using spring 3.2.2 )
thanks man
Your solution is very helpful ❤
"The method save(User) is undefined for the type UserRepository" this error comes at 6:38
userRepository (small 'u' . Method ko reference variable ke through access karo bhai.)
Facing the issue "no qualifying bean of type User Repository" available.. Please help.. I have spent hours figuring this out..
P. S I HAVE ALREADY TRIED BY KEEPING THE POJO, DAO AND MAIN CLASS IN SAME PACKAGE.. IT DIDN'T WORK
hii..i am also facing the same error ? have u got the sol?
@@akritimishra4971 did anyone get the solution to this problem?
have you got the solution? i am also facing same problem.
@@DeepakYadav-hv8ln anyone got the solution????????
Just update the project and restart sts
Yaar Durgesh bhai, ek no. padhate ho aap!!
Description:
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
getting this error
Same Error ...
User Entity class me each name and city ko column name and class name ko table name diye bina kaise kaam kiya?
@6.00 i m getting error in user.setCity and user.setStaus.
I only get recommendation of user.setName..........plz reply(anyone...)
same here
delete all other import of 'User' and include the below one
import com.example.demo.entity.User;
@@anirbanmanna2897 thanks man👍👍
@@anirbanmanna2897 this i have to do in user class na
@@anirbanmanna2897 thanks bro solved..What you have suggested ..We have to do it in main() method class..without deleting any import packages
hello sir how to add php database to spring bootapp and sir there issue to source path how to solve error is "Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. Reason: Failed to determine a suitable driver class".
I am getting error: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type.
please help! I have coded exactly same step by step as shown in the video.
hey did you find any solution to this?
@LearnCodeWithDurgesh sir, It's a common error being thrown and being faced. No solution was found after trying a lot.
@@piyushmathpal4244 did you get solutions i also tried with @Repository on my interface
Getting this error
Description:
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
Reason: Failed to determine a suitable driver class
tried everything from google , stackoverflow, quora etc but problem remained same
got any solution for this error?
Try this configuration
spring.datasource.url=jdbc:mysql://localhost:3306/dbName
spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver
spring.datasource.username=
spring.datasource.password=
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect
spring.datasource.initialization-mode=always
spring.jpa.defer-datasource-initialization= true
spring.sql.console.enabled=true
spring.jpa.hibernate.ddl-auto=update
same error
@@paragnaik5097 do try above configuration
@@saurabhkumarjha2370 didn't work, tried all the stackoverflow suggestion
Thanks, sir. Today I am learn 100% about JPA because of You.
thora english bhi sikh lijie sir
G Sir..bahut achhe se smjh aa rhi h. Thank u so much. Spring boot me security bata dijiyega Sir ji
Getting error .... Exception in thread main no qualifying bean .....
Please help to resolve.
Sad to see, such a knowledgeable video but has only 249 likes
Solution of etting error in user.setCity and user.setStaus etc :-
------------------------------------------------------------------------------------------------
delete all other import of 'User' and include the below one
import com.example.demo.entity.User; // or your own entity user class
bro help me getting same problem
still didn't getting
sir, i am getting this error nd i import it in user but error not gone, help me
@@akshayparsade9678 first import your own User class, not any predefined User class
@@anirbanmanna2897 yes i import my own user, nd deleted all this @Entity @Id
@GeneratedValue import but error comes again in it.
@@akshayparsade9678 have you resolved that problem im getting the same problem
Hi Durgesh sir,
I am getting
APPLICATION FAILED TO START
***************************
Description:
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
Reason: Failed to determine a suitable driver class
Action:
Consider the following:
If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).
this error.(added correct properties in application.properties file ) but still I am facing this issue .
Please, help me 🙏 to solve this error .
Hii brother, I fixed the issue
"user" is a reserved keyword in postgresql. Change your table name to something else
Hi,
Amazing, your video is really helping me in our project. How do I utilize my existing database and table in sql server. Can you please create a video on that too. I've my project in jsp+servlet and now converting them to spring boot, so, I've my existing database, how can I utilize it.
Use {jakarta.persistence}.
"the javax namespace changed to jakarta for frameworks whose APIs have moved to Jakarta EE"
ctrl+ shift and ??????
t
In UserRepository we have not added any @component, any @Repository etc.. how it's bean is getting created ?
Pls help sir.
we dont need to add @controller and @repository all objects are created by main class which are within the package
@@shubhamsinghal3326 giving me an error in the UserRepository line
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured...
Hi ..when I am going for user.setCity there is no option Comming for city name what should i do
check that you mention the String city as a field in the entity class or generate a getter setter of it !!
the method setcity is undefined for the type security.properties
Any solution?
Please help!
I am getting driver class name not found instead of implementing every steps. How to resolve this sir?
thank you so much sir..........
Sir auto suggestion is not working in sts (only when writing code in application.properties file).I have tried many solutions but none of them worked for me.please if have some solution regarding this then tell me... thanks 🙏
Add required plugins
Good Video
Hi,
This video is nice but the "url' attribute is not specified and no embedded datasource could be configured ". tried all of the steps, None of them works, Is there anything you can do
How to resolve this?
Great experience learning
I'm getting communication link failed error....please help!
Error gya ya nhi
how did you resolve it ?
User user1=UserRepo.save(userm);
Ihave Error this line "Cannot make a static reference to the non-static method save(User) from the type CrudRepository" please help me
Anywhere u have used static key word ?
why you have written '.class' in the code : context.getBean(UserRepo.class) ???
because UserRepo is interface not a class time : 5:50
My table is not created in mysql
good
Hi, I am facing problem while configuring
"org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRepository' defined in com.jpa.test.dao.UserRepository defined in @EnableJpaRepositories declared on BootJpaExampleApplication: Not a managed type: class com.jpa.test.entities.User".
Please help me to continue further
i am facing same problem . please help
what is the solution for this error please help
The method setCity(String) is undefined for the type SecurityProperties.User
The method setStatus(String) is undefined for the type SecurityProperties.User
Sir how to find MySQL Dialect class in visual studio code ......
Do you know now???
If yes, then please tell
Sir please tell us how to create test database in MySQL
Write a query
Create database test
And execute it
ensure that you are in correct user of mysql and fire the command create database test
can anyone plss how can i see my my hybernate dialect version in my sts pls what should i type in class sir talked that fast crtl+shift +what plss tell me
Ctrl+shift+T
Nice explanation
MySQL57Dialect and MySQL8Dialect are depricated so what to use??
use MYSQLDialect instead
I am getting ": CLIENT_PLUGIN_AUTH is required" error while running the program. I have been following your tutorials of Spring core, Spring MVC and now Spring boot. But there i am facing this error. Please try to help me out.
For databases above 5.1, running the FLUSH HOSTS command may help monitoring to be re-established.
Spring Boot + Snowflake DB ka bhi playlist bnaiye sir....
Just awesome
Sir jldi jldi videos laao sir Spring BOOT p
i will subscribe you if you answer my question?.
my question my sql data base stored and how to set my sql work bench part is not underrstood.
Thank you sir
awesome
Caused by: org.postgresql.util.PSQLException: ERROR: syntax error at or near "user"
Position: 13
I am using postgresql
bro guarranted solution for postgresql db. just go via this stackoverflow link below
try to change user table name with @table , as user is reserved key in postgres
stackoverflow.com/questions/40399460/psqlexception-error-syntax-error-at-or-near/40399758
@@atharvsingh6901 nhi hua yar
@@mohitpatil5673 bro User table ka naam change kardo using @Table(name="user_details") bcz User name is a reserved keyword in postgresql. i spent a whole day resolving this issue
@@atharvsingh6901 thanks bro
@@bainapalliakash7039 you are welcome bro
hello sir plz ans my question how do u directly call this user repository.class inside of getbean method , even if this is interface and u r not @Autowired any where
brother beacuse he makes the object of repo interface in class
Thanks bro
How to use jpa in mvc web app?
when i run this program it show error
org.hibernate.exception.GenericJDBCException: Unable to open JDBC Connection for DDL execution
its show sql error also please tell me what to do
without this program we can't perfor crud operation
bro guarranted solution for postgresql db. just go via this stackoverflow link below
try change user table name via @table
stackoverflow.com/questions/40399460/psqlexception-error-syntax-error-at-or-near/40399758
@@atharvsingh6901 thank you so much brother
Would you please tell us the solution
How to know dialect of my sql ?
for me org.hibernate.dialect.MySQLDialect is working fine
Solution for BeanCreation Exception:
When we copy paste dialect , in properties file , remove ~package~ keyword and only use package name .
Save And run..
Hellosir,I have followed all steps, table is created in database but data was not inserted... could you please suggest any solution for this
Same problm
Same problem
I am facing issue"No qualifying bean of type UserRepo available.
Please help me to sort out this problem
Check where is your main application. That should be in the root package
when executing the code the table is getting created as expected and data is also getting stored in the table but one other table is getting created named user_seq with a single column next_val can anyone let me know why is it happening
Yes , this is because we are making Id column as Auto generate ,
so , Fisrt hibernate is generating Sequence table in DB and than updating User Table
Please make video on Spring microservices.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRepo' defined in com.jpa.test.dao.UserRepo defined in @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Not a managed type: class com.jpa.entities.User
getting this error...any solution plz..
not a managed type meant that either you have not declared your Entity as entity using annotation (@entity) or you have not added type generics to the CRUDRepository interface( it should be extended as public YourRepository extends CRUDRepository ) ---> here entity type is a type of your entity you want to do crud operations on. Ex : Student or User etc
if its still not working, then let spring boot scan the entity package by using @componentscan(basePackages="com.entities")
if you are getting errors still like file not found or shutdown
@EnableJpaRepositories("com.jpa.test.dao")
@EntityScan("com.jpa.test.entities")
use this in the main file and also in dialect the dialect is-
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect
now the version needn't be given anymore
sir g rest controller annotations laye aur spring boot ki baki annotations lao
pleased any one know how to solve jni exception pls help me...
I am getting user_seq table alongside with user table in DB
yes , this is correct , because we are using Id to be auto generated
Sir kisi bhi java file mei akar ctrl shift ke baad konsi key press krni h samajh ni ahh rha...
you can press these with together then you will get MySQL dilect: ctrl+shift+T
🔥
received below error
Error creating bean with name 'userRepository' defined in com.jpa.test.dao.UserRepository defined in @EnableJpaRepositories declared on JpaRepositoriesRegistrar.EnableJpaRepositoriesConfiguration: Not a managed type: class com.jpa.test.entities.User
4:07 -> ctrl + shift + p is not working in mac any alternative for mac ?
ctrl+shift+t
@@comedybro716 no it's wrong
From where and how to download SQL yog??
sir please tell how to create test in mysql workbench and how to connect sts and workbench
bhai pta chala kya kaise krte hai ?agar ha to tu hi bta de 2 saal ho gye.. mereko nhi pta
try to use else User name class
How will we know which SQL dialect version we have to use?
That depends on which version of Sql you are using. As I have mysql 8.0.31 version I will use MySql8Dialect.
@@aniketjha7606 Yes.
org.hibernate.dialect.MySQL8Dialect is correct for the above version. i too have MySQL8 and the version you mentioned works for me.
My question is that You didn't pass the id so how did it show inside the table??
it's using auto-generated value for id. given by the annotation.
@@Deep_Aman Thanks for reply to me,,, later that que i read about it on web then realised that there are several strategies to create id in the table. Spring boot really is a powerful framework.
Thanks again
How to use auto complete in application.properties file?
CTRL+Space
Sir jobs k liye bhi kuch daal do job kaise dhundee aur aapne kaise job Search ki thi
4:00 dialect
Sir payment gateway ka tutorial dijye java par
Error creating bean with name 'entitymanagerfactory'
Solution mila bhai?
Plz tell me ...I also found same eri
@@amitraaz7231 plz tell me I have also found same error
My database is not showing in workbench Reason??
same problem..can u help me?
How to connect with db?
Kam se kam 20 munits ka video banaiye sir
Ye Id 5 kyun ha 1 se shru nhi hoga ?
I've followed the same steps but it showing dialect error
you can also use h2 database instead of using mySql
Sir userrepository aik interface ha iska object kasa ban ra aur hama kasa mil ra help help help
Implementation claass ka object bantna
@@LearnCodeWithDurgesh sir still i have not understood how getBean is used with interface "UserRepository".Kindly explain it.
@@akritimishra4971 give package name like this
com.jpa.test
com.jpa.test.dao
com.jpa.test.entities
good but sir code ka link v post kr dete
Nice video 👍. How can we store database password in production?
use password hashing and salting
Table is created in database but the data not interested
u got it solved ?? what was the error ?? same issue mine !!
The method setCity(String) is undefined for the type Security properties.User
I got the error for setCity and setStatus can anybody help me
Also can anybody tell in com.jpa.test which packages are imported?
check import class name i also got same error but now resolved
1:18 voice disappeared
Some video are very improper😢😢😢...
BIG RED FLAG
It is not recommended for Beginners.
please help
Unable to resolve name [org.hibernate.dialect.MySQL57Dialect] as strategy [org.hibernate.dialect.Dialect]
how can i remove this error
Exception in thread "main" org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.springproject.dao.UserRepositery' available....plz sir give me solution how to slove this exception
hey, did you find any solution to this?
@@piyushmathpal4244 Plz check ur package name. The package name should be in a hierarchical manner.
like
com.jpa.test
com.jpa.test.dao
com.jpa.test.entities
@@fire_aagits in the hierarchical manner but also getting error
ctrl+shift+what?
T