Thanks for a great channel and very good content! I'm in a boot camp style of education to be a java programmer right now and your channel is almost like a blue print of everything we learn. Like it a lot and the way you explain everything, Slow and easy to keep up to. Not like other channel where everything is exlained in 10 seconds and then you have learned zero. Keep up the good work!
Thanks again! Can you create videos about architectures? like N tier, pipeline, polygonal , etc. And tell us what are pros and cons? And how to determine which architecture will fit best for which specific purposes?
I came from Laravel, the spring is very complex you have to write ten-line code to do one query. I don't know why people still use spring. The funniest thing, the instructor thought with spring we can write code very fast
Hey, I have a few questions. Why do you use UUID + extension for postgres instead of bigint/integer + sequence generator? And the second one: why don't simply use spring datasource autoconfiguration provided by spring boot instead of manual configuration PostgreDatasource?
Are the any way to use the Application.Properties to connect instead of deleting it and creating the Application.jar file? No matter what I do it just keep pointing at my local postgres database instead of the one in docker...
I would really love to take a look at your testing code since it is not included in the source code that you provide in the description of the video. I am really struggling to track a NullPointerException while trying to recreate the little is shown in the video about testing the database access services.
Hi there! I tried to follow the tutorial. But the link to the code to be cloned in the tutorial, seems to be different than the one explained in the video and I tried to locate the correct code in your repository list and couldn’t find it. Thought I would let you know. Is the code still available somewhere else?
I am following this tutorial and I am trying to develop a todo list app with Spring Boot + Postgres and JPA ORM requirement. in meantime, I didn't find any solution for below questions? Really I need a docker for this project? I can change this project into JPA ORM? How can automatically move my table to my PostgreSQL database? Do I need any VPN or xampp for connecting Postgresql to SpringBoot?
Hi, I am getting a little bit confused... So my demodb is running on Docker on port 5432 and if i try to open SQL Shell and choose port 5432, than I can see my demodb, but if I open pgAdmin I can't see demodb because it's running on different port. I tried to run pgAdmin on 5432 but I can't because docker is already running on that port. Btw Great Video!
Great Video! May I ask you a question? I want to use spring-jdbc to be more in line with DDD principle, and use as ID the uuid. My question is, how can I simply set up the entity to use uuid_generate_v4() as a default method for generating the ID? I notice that some use as DEFAULT into the sql script the uuid_generate_v4(), but this is the right way for doing this? Thanks!
Salam brother, I have question. I am confused that what is the diffrence between connecting to postgreSQL and connecting to PostgreSQL with Hibernate. Why we use Hibernate? I am actually asking because hibernate is easy to connect but Why we use it because we can connect to postgreSQL without using hibernate. Could you help me for this question? Thank you in advance.
Hello! In your opinion, what is the best documentation format for such restful services, for developers? What project documentation do you usually use on your projects? Thank you in advance!
I get an error at 32:55. It says that org.postgresql.util.PSQLException: FATAL: database "demodb" does not exist. I have the demodb database created on a docker container with port 5432 exposed. I don't understand why this is happening.
Hi Thank you so much for this great video ; I have installed Postgres on Windows 10 and created the db I stuck at the 24:00, when I started the application I got the same error (Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured) 1. I created the DataSource 2. and Inject URL, Username and Password I appreciate any help Thx
At 33:00 where you re-run the application, I encountered "Unable to obtain connection from database: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections." error. Upon much googling seems like I might need to check if the postgresql.conf or pg_hba.conf file has allowed this connection but this file seems to be in the postgresql folder if installed directly and I can't seem to locate anywhere (maybe because it is a docker image?) Is there a fix to this if anyone encountered the same problem and found a solution? Would really appreciate it as I am still very new to docker/postgresql in general, thanks in advance!
Hey Nelson, thanks for the lesson. It seems that there's a mistake with the repository, the source code of this lessons isn't there :( Would you mind fixing it?
hey I'm using Spring boot 2.2.2 and IntelliJ IDEA 2019.3.1 and I think the debug is not enabled by default. How to enable it? Because when the error occurred, there was a line like this Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
Hey could you help me with something please I'm trying to validate my fields from my models with MethodArgumentNotValidException I override a method everything is fine but I don't know how to use it in my controller I've been reading that spring picks this up automatically but It's not working when @valid fails
Hey, very nice tutorial followed it all. I have an error though. At 32:52, when you start the application I get "Unable to obtain connection from database: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections". I've copied everything that you did so all the parameters should be fine ( double checked on that ). Is there any chance that you have run into this problem and have an answer to it? Thanks and keep up with the great work!
@@mariangabrielneacsu4873 Seeing this same issue as well. Followed this tutorial a couple weeks ago, and everything worked great. Came back to it a couple days ago, and now I'm seeing the same error. Of note, I also can't connect from the host via pgAdmin or another client. I _can_ connect to postgres from inside the container (via docker exec). So, the container is running. My configuration is exactly as the tutorial lays out. The only variable here seems to be the passage of time.
HI, I man getting error: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource. Can you please assist
You should really share the code that you show in the video on Github and not a "similar project". And btw, what is Flyway used for in the project? just to create a table?
I got an error that said connection to localhost:5432 refused. My environment is Windows 10 Already set up the firewall to allow port 5432. But I checked on the listening port 'netstat -an' there's no port 5432 alive. Though in the docker, port 5432 is alive
@@amigoscode okay... I stopped the postgre container and run a new one with -p 5432:5444 and configure the jdbc-url to port 5444 the result is still connection to localhost:5444 refused
Caused by: org.flywaydb.core.internal.exception.FlywaySqlException: Unable to obtain connection from database: FATAL: role "postgres" does not exist even though I have a db in a container running with that role >
I am an ardent follower of all your channels Please help- I am getting the following error when I tryin to connect and create table in AZURE SQL DB through Spring boot --- Error executing DDL "create table model_student (id integer not null, name varchar(255), school_name varchar(255), primary key (id)) type=MyISAM" via JDBC Statement I am using this configuration -- spring.datasource.url= spring.datasource.username= spring.datasource.password= spring.datasource.driver-class-name=com.microsoft.sqlserver.jdbc.SQLServerDriver spring.jpa.hibernate.ddl-auto=create spring.jpa.show-sql=true spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLMyISAMDialect
I do not like this video. The way you show us is far to complicated. You should use Jpa instead. No SQL, no ORM mapper, just annotations in the entity c!ass. And spring generates most of the queries for us too. Sorry for that. Like your other videos.
For people that just watched the previous video, you can start at 9:30
thanks buddy
First part here: ruclips.net/video/r-6BwGW4Sr8/видео.html
Thanks for a great channel and very good content! I'm in a boot camp style of education to be a java programmer right now and your channel is almost like a blue print of everything we learn. Like it a lot and the way you explain everything, Slow and easy to keep up to. Not like other channel where everything is exlained in 10 seconds and then you have learned zero. Keep up the good work!
Thanks again! Can you create videos about architectures? like N tier, pipeline, polygonal , etc. And tell us what are pros and cons? And how to determine which architecture will fit best for which specific purposes?
I've been waiting for this...thanks man
thanks. ive been binging your videos for a few days now. im debating buying your course now
He has a course?
I came from Laravel, the spring is very complex you have to write ten-line code to do one query. I don't know why people still use spring.
The funniest thing, the instructor thought with spring we can write code very fast
Hey, I have a few questions. Why do you use UUID + extension for postgres instead of bigint/integer + sequence generator? And the second one: why don't simply use spring datasource autoconfiguration provided by spring boot instead of manual configuration PostgreDatasource?
1 dislike: wtf is his problem?! thanks a lot man
hahahahah thanks brother
maybe racism or some other dementia...
You are Best guy on RUclips :) very good content!
and you are the best subscriber :)
Thank you so much. I've been waiting for this video 🙂🙂
🙂
Excellent. Easy to understand and straight forward. Thanks very much
Good tutorial, I am a new Spring boot, so I hope you will have more tutorials about spring boot
oh yes. checkout my website. amigoscode.com/courses
Another great video, can you cover Spring Boot JPA?
Sure
Hi Nelson yet another helpful video !!, please make one video with hibernate, JPA
Very good video. Thanks. Not sure why did you use JDBC in place of JPA?
Are the any way to use the Application.Properties to connect instead of deleting it and creating the Application.jar file? No matter what I do it just keep pointing at my local postgres database instead of the one in docker...
Excelllent.. what changes I need to do to connect to an oracle database?
Pls can you make a tutorial on how to connect and use MySQL database in Spring Boot
I would really love to take a look at your testing code since it is not included in the source code that you provide in the description of the video. I am really struggling to track a NullPointerException while trying to recreate the little is shown in the video about testing the database access services.
Hi there! I tried to follow the tutorial. But the link to the code to be cloned in the tutorial, seems to be different than the one explained in the video and I tried to locate the correct code in your repository list and couldn’t find it. Thought I would let you know. Is the code still available somewhere else?
I am following this tutorial and I am trying to develop a todo list app with Spring Boot + Postgres and JPA ORM requirement. in meantime, I didn't find any solution for below questions?
Really I need a docker for this project?
I can change this project into JPA ORM?
How can automatically move my table to my PostgreSQL database?
Do I need any VPN or xampp for connecting Postgresql to SpringBoot?
thanks man, you are awesome
you too buddy 😉
Hi, I am getting a little bit confused... So my demodb is running on Docker on port 5432 and if i try to open SQL Shell and choose port 5432, than I can see my demodb, but if I open pgAdmin I can't see demodb because it's running on different port. I tried to run pgAdmin on 5432 but I can't because docker is already running on that port. Btw Great Video!
Great Video! Do you know much about MongoDB? Is the implementation much different with a mongo database?
you are a very good teacher. thanks!!
thanks buddy
Great Video!
May I ask you a question?
I want to use spring-jdbc to be more in line with DDD principle, and use as ID the uuid.
My question is, how can I simply set up the entity to use uuid_generate_v4() as a default method for generating the ID? I notice that some use as DEFAULT into the sql script the uuid_generate_v4(), but this is the right way for doing this?
Thanks!
Thank you sir. Do you planing make some with Hibernate JPA?
Unhandled exception: java.sql.SQLException
in Query
Excellent tutorial(s)!
Thanks
Thnks ! so useful
Thank you very much for this tutorial! I do have a question. Why are double underscores required for the sql file?
Is because of Flyway flywaydb.org/getstarted/how
@@amigoscode Thanks
Hello, how do we retry the connection to the database? Is there some application properties for that?
did you learn spring boot by just reading through the official docs on the site?
Merser yes the docs are great 👍🏾
Salam brother, I have question. I am confused that what is the diffrence between connecting to postgreSQL and connecting to PostgreSQL with Hibernate. Why we use Hibernate? I am actually asking because hibernate is easy to connect but Why we use it because we can connect to postgreSQL without using hibernate. Could you help me for this question? Thank you in advance.
Is the repo no longer available from GitHub?
Hello! In your opinion, what is the best documentation format for such restful services, for developers? What project documentation do you usually use on your projects? Thank you in advance!
I always use the official docs
Incompatible parameter types in lambda expression at 42:00
help
what needs to be done if I want to connect a NoSQl database like Cassandra?
Great video. thanks!!
Hi, great videos! Just one question, is there a reason to why you named it v1? some kind of convention? (api/v1..)
Yes. if you want to introduce a new version of the API you do not break the existing one and you can deprecate it
Thank you! this is awesome.
How about Spring Batch with postgres?
Yep can do it
I get an error at 32:55. It says that org.postgresql.util.PSQLException: FATAL: database "demodb" does not exist. I have the demodb database created on a docker container with port 5432 exposed. I don't understand why this is happening.
You need to create the database manually
@@freerider6300 did you find any solution
Any solution for this? I’m facing the same... is it specific to window 10??
Hi
Thank you so much for this great video ;
I have installed Postgres on Windows 10 and created the db
I stuck at the 24:00, when I started the application I got the same error (Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured)
1. I created the DataSource
2. and Inject URL, Username and Password
I appreciate any help Thx
At 33:00 where you re-run the application, I encountered "Unable to obtain connection from database: Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections." error. Upon much googling seems like I might need to check if the postgresql.conf or pg_hba.conf file has allowed this connection but this file seems to be in the postgresql folder if installed directly and I can't seem to locate anywhere (maybe because it is a docker image?) Is there a fix to this if anyone encountered the same problem and found a solution? Would really appreciate it as I am still very new to docker/postgresql in general, thanks in advance!
The github link is giving me "Page not Found". Is there another one to pull the repository?
Hey Nelson, thanks for the lesson. It seems that there's a mistake with the repository, the source code of this lessons isn't there :( Would you mind fixing it?
Yes there is mistake.
Thank you so much. Great video =)
You are welcome
I'm having trouble with the deleteById method. When using the jdbc method .update() what type do you use for the last param?
Also great video!
you pass the the id
Amigoscode thanks for replying! ill try it
Racso let me know if you need help
Thank you Sir.
You welcome my friend
hey I'm using
Spring boot 2.2.2
and IntelliJ IDEA 2019.3.1
and I think the debug is not enabled by default.
How to enable it?
Because when the error occurred, there was a line like this
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
You need to stop and run the application in debug mode
Hey could you help me with something please I'm trying to validate my fields from my models with MethodArgumentNotValidException I override a method everything is fine but I don't know how to use it in my controller I've been reading that spring picks this up automatically but It's not working when @valid fails
@Valid from which package are you using?
@@amigoscode Thanks I already resolved that yeah I was importing wrong @Valid
With the Postgres DB being containerized with Docker the data (database, table, data) will be lost when the container is restarted, correct?
Yes thats why you should never put your database in a container in real life applications
Hey, very nice tutorial followed it all. I have an error though.
At 32:52, when you start the application I get "Unable to obtain connection from database:
Connection to localhost:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections".
I've copied everything that you did so all the parameters should be fine ( double checked on that ). Is there any chance that you have run into this problem and have an answer to it? Thanks and keep up with the great work!
did you configure the db properly?
@@amigoscode Yeah followed your same steps on docker
@@mariangabrielneacsu4873 Seeing this same issue as well. Followed this tutorial a couple weeks ago, and everything worked great. Came back to it a couple days ago, and now I'm seeing the same error. Of note, I also can't connect from the host via pgAdmin or another client. I _can_ connect to postgres from inside the container (via docker exec). So, the container is running. My configuration is exactly as the tutorial lays out. The only variable here seems to be the passage of time.
HI, I man getting error: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flywayInitializer' defined in class path resource.
Can you please assist
join the group and we ll help you
You should really share the code that you show in the video on Github and not a "similar project". And btw, what is Flyway used for in the project? just to create a table?
Yes sir
So you've build a cloud app?
Can i build a GUI to it?
Sorry I'm a Beginner
Yes. This course amigoscode.com/courses/spring-boot-fullstack
I cannot connect to the database inside the docker container but when I run manually it works fine. WHY?
Dm me on Facebook
For some reason i keep getting "org.postgresql.util.PSQLException: The connection attempt failed." error
password maybe wrong?
mysql vs postgres ?
I got an error that said connection to localhost:5432 refused.
My environment is Windows 10
Already set up the firewall to allow port 5432. But I checked on the listening port 'netstat -an' there's no port 5432 alive.
Though in the docker, port 5432 is alive
what is using 5432 on the host? You remap if in use. But I doubt, that port is usually set used by Postgres
@@amigoscode okay...
I stopped the postgre container and run a new one with -p 5432:5444
and configure the jdbc-url to port 5444
the result is still connection to localhost:5444 refused
Could you have tutorial of spring boot with JPA?
Yes I will
Hi!
Where's the link to part 1?
Thanks
here: ruclips.net/video/r-6BwGW4Sr8/видео.html
Caused by: org.flywaydb.core.internal.exception.FlywaySqlException:
Unable to obtain connection from database: FATAL: role "postgres" does not exist
even though I have a db in a container running with that role
>
Can you login using that role using terminal?
@@amigoscode got it sorted. Had a pg installed on my machine.
I am an ardent follower of all your channels
Please help-
I am getting the following error when I tryin to connect and create table in AZURE SQL DB through Spring boot --- Error executing DDL "create table model_student (id integer not null, name varchar(255), school_name varchar(255), primary key (id)) type=MyISAM" via JDBC Statement
I am using this configuration --
spring.datasource.url=
spring.datasource.username=
spring.datasource.password=
spring.datasource.driver-class-name=com.microsoft.sqlserver.jdbc.SQLServerDriver
spring.jpa.hibernate.ddl-auto=create
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLMyISAMDialect
Seems weird not to have used Spring Tool Suite.
Why?
For me Hikari... didnt work
the links, not works !!
:D
:D
I do not like this video. The way you show us is far to complicated. You should use Jpa instead. No SQL, no ORM mapper, just annotations in the entity c!ass. And spring generates most of the queries for us too.
Sorry for that. Like your other videos.
Please stop saying "and then". It is so boring to hear. otherwise you are a good teacher.