Spring Boot Tutorial for Beginners (Java Framework)

freeCodeCamp.org · 1.9M views · 2019 · 1:49:29

Open on YouTube

Web developmentSoftware architecture & designC, C++, Rust, Go & systems languagescourse

Why Stack Overflow recommends it

Stack Overflow users cite it when they are following the tutorial and hit errors, such as database connection failures, 401 and 404 responses, or RowMapper lambda problems.

Recommended by 1 people across 1 different months, 2020 to 2023.

What it is

A 1h49m freeCodeCamp.org course from Amigoscode that walks beginners through building a Spring Boot Java application, including REST endpoints, a Postgres database run in Docker, and Flyway migrations. It is a follow-along coding tutorial with a public GitHub repo.

What people said

Recommends HelloTy · 2022-09 · Stack Overflow · on “Connect docker container to spring boot app”

I'm following a tutorial to create a mild spring boot application. I am running the IntelliJ community edition. I want to connect a docker container running Postgresql to the application. The idea is that there is a person database which has two tables for a name and id. I want to connect the person database with the spring boot app so I can run queries against it. [this video] I ran a docker-compose in terminal to create the container, then installed the docker extension on IntelliJ. I am new to this so please be patient. I am willing to redo if there are better approaches. I have attached source code for my controller, the link of the tutorial, an image of docker container running in IntelliJ,

Cites Jon · 2020-05 · Stack Overflow · on “PostgreSQL ‘database does not exist’ - Java Spring Boot, Flyway, Docker/PostgreSQL”

I’m following this tutorial: [this video] … and I am having trouble with database migrations. I am using Spring Boot 2.2.7, and I have created a PostgreSQL database called “demodb” When I run the program, the console gives the error: org.postgresql.util.PSQLException: FATAL: database "demodb" does not exist Here is my application.yml file, which contains the database info: app: datasource: plaltform: postgres jdbc-url: jdbc:postgresql://localhost:5432/demodb username: postgres password: password pool-size: 30 Here are my dependencies in the pom.xml file: <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependen

Cites Jon · 2020-05 · Stack Overflow · on “Spring Boot GET Request gives 200 OK status, but Postman returns "ø" as response body”

I'm brand new to Spring Boot, and I've been walking through this tutorial ( [this video] ), but I am stuck at this point. Any pointers would be greatly appreciated. I'm able to make a POST request and see the request go through with a 200 Status in Postman, but when I make a GET request to retrieve JSON data, I see a 200 Status, yet there is no response in Postman console, only a "ø" - anyone know what I could be doing wrong? Here is my Controller: package com.example.demo.api; import com.example.demo.model.Person; import com.example.demo.service.PersonService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import java.util.List; i

Cites Frankie Guarino · 2020-08 · Stack Overflow · on “PSQL Shell nor my jdbc-url can find my Docker container databases on application boot up”

I am attempting to follow along a SpringBoot tutorial here [this video] and the final act is using a .yml file to bridge my logic code to a containerized database. On start up, the application does not find my containerized database at jdbc-url: jdbc:postgresql://localhost:5432/demodb and I get this error FATAL: database "demodb" does not exist To create database "demodb" with the psql shell was the only way to avoid this error but, I want to be able to use the container's database, and I believed that the psql shell would have visibility to what was created inside my container. The screenshot here proves otherwise (Left is the shell). (Right is the container) [LINK] All logins (for container and

Cites user14136803 · 2020-08 · Stack Overflow · on “how can i fix "Error 401 Unauthorized" on Spring Boot”

I started watching a Tutorial on how to make a very basic Spring Boot Project. [this video] No matter what i do i always get error 401, even when i copy the code 1-1. Thank you in advance for taking your time to help me. I tried putting this into the application.properties spring.jpa.hibernate.ddl-auto=update spring.datasource.url=jdbc:mysql://localhost:3306/LoginDB spring.datasource.username=root spring.datasource.password= I made following Files Folder structure [LINK] Player package com.Project_A.Databaseconnection.Artifact.model; import com.fasterxml.jackson.annotation.JsonProperty; import java.util.UUID; public class Player { private final UUID id; private final String PlayerName; public Pla

Cites Cole · 2021-12 · Stack Overflow · on “Declaring a RowMapper with a lambda expression -- Wrong number of parameters: Expected 1 but got 2”

I'm learning Spring and I was following along with this tutorial [this video] , but suddenly I started getting an error around this RowMapper assignment. RowMapper<Person> rowMapper = (resultSet, i) -> { UUID id = UUID.fromString(resultSet.getString("id")); String name = resultSet.getString("name"); return new Person(id, name); }; It's telling me that I'm using the wrong number of parameters in the lambda expression. My code is identical to the video. I've looked up several other similar questions on StackOverflow and they all line up with what I have. What am I doing wrong?

Cites gpnrunxm · 2023-06 · Stack Overflow · on “Can't get Postman to give a 200 despite following freeCodeCamp tutorial on Springboot”

I have followed a beginner guide from freeCodeCamp, and unlike the video, do not get a 200 status code instead a 404. I have searched stack overflow and other forums but nothing works. postman showing 404 [LINK] I read that it is possible that in a spring boot application with multiple packages that the main activity needs to scan them with @ComponentScan annotation to check all packages. However that did not help. Other solutions I have tried and not worked are from postman (), or here. I also re-created this on a different computer but it still gives me a 404. I also checked to make sure that postman is correctly configured, following the documentation guide, which was successful for the g