Creating Spring Boot Web Application Using VSCode Part-1

  Рет қаралды 14,768

Let's Learn Together

Let's Learn Together

4 жыл бұрын

In this series, we will a full CRUD application using SpringBoot.
MyEnvironment:
MAMP (mysql server) with mysql workbench
VScode with java support extension.
System Requirements:
Java,
Maven,
MySQL Server (Database)
Visual Studio Code
Brief Overview of:
IntelliJ IDEA (Professional Edition vs Community edition)
Eclipse (SpringToolSuite) (Good for beginners)
VS-Code (text editor supported by extensions/ plug-ins)
class creation in vscode vs the other two
To check Java and Maven is installed:
java -version
mvn -v (mvn = maven)
Some useful VS-code extensions for Java:
VS-Code extensions for Java and Spring Boot:
Spring Boot Extension Pack (marketplace.visualstudio.com/...)
Language support for Java by RedHat(marketplace.visualstudio.com/...)
Maven for Java by Microsoft (marketplace.visualstudio.com/...)
Java Extension Pack by Microsoft (marketplace.visualstudio.com/...)
Spring Initializr Java by Microsoft
Debugger for Java by Microsoft
Spring Boot Dashboard for VS code (marketplace.visualstudio.com/...)
About the first CRUD (Create, Read, Update, Delete) application:
We have a company called XCARS. In order to be innovative, we want our employees to share their ideas-
about new feature that a new modern car can have.
Our Companies Website:
ideas.xcars.com
the reverse domain name will become: com.xcars.ideas
Action I:
Downloading Spring Boot package from start.spring.io/
Some additional link to Maven and Spring Boot.
mvn package
java -jar target/myproject-0.0.1-SNAPSHOT.jar
java -jar build/libs/gs-accessing-data-mysql-0.1.0.jar
(spring.io/guides/gs/accessing...)
(docs.spring.io/spring-boot/do...)
mvn spring-boot:run (start the downloaded package)
Dependencies:
mysql, web-starter, hibernate(JPA), devTools
To render webpage:
jstl, tomcat jasper
JSP:
www.javaworld.com/article/333...
JSTL:
www.tutorialspoint.com/jsp/js...
To run the project:
MySQL configuration needs to be added to application.properties
Link: (spring.io/guides/gs/accessing...)
spring.jpa.hibernate.ddl-auto=update
spring.datasource.url=jdbc:mysql://${MYSQL_HOST:localhost}:3306/db_example
spring.datasource.username=springuser
spring.datasource.password=ThePassword
none: This is the default for MySQL, no change to the database structure.
update: Hibernate changes the database according to the given Entity structures.
create: Creates the database every time, but don’t drop it when close.
create-drop: Creates the database then drops it when the SessionFactory closes.
MySQL:
Database creation: create schema ideas // or create database ideas.
create, drop, select
Building the web structure:
Building the structure: create a folder name it "webapp", inside it create another called it WEB-INF
/webapp/WEB-INF/index.jsp
Add in application.properties the preffix, suffix
create controller package inside project folder
Action II:
cmd +shift+ p
application.properties

Пікірлер: 8
@ebg342
@ebg342 3 жыл бұрын
Hi, you made a really good work in this video I was looking for videos like this using spring+VSCode I'll continue with your list. Greetings from Costa Rica!!
@toufiqurrahman7025
@toufiqurrahman7025 4 жыл бұрын
looks very good
@mugiranezajohn5285
@mugiranezajohn5285 4 жыл бұрын
well explained
@letslearntogether7469
@letslearntogether7469 3 жыл бұрын
This video was recorded before Spring boot 2.5. Spring boot 2.5 doesn't automatically add the POM.xml's Validation dependency. Please the following code in the project POM.xml inside dependencies. This will allow you to use @Id, @Size annotation inside the model object. : org.springframework.boot spring-boot-starter-validation
@glennroland5359
@glennroland5359 3 жыл бұрын
Hello, I've followed the tutuorial step by step. In the video you had any errors when you add dependencies in your pom.xml file but when I do so I got many errors (missing artifact). Can you help me ?
@letslearntogether7469
@letslearntogether7469 3 жыл бұрын
Can you please share your error? Add this code to POM.xml -> and let me know if it fixed the error. Spring Boot 2.5 doesn't automatically add the Validation's dependency: org.springframework.boot spring-boot-starter-validation
Creating Spring Boot Web Application Using VSCode Part-2
38:10
Let's Learn Together
Рет қаралды 3,8 М.
The day of the sea 🌊 🤣❤️ #demariki
00:22
Demariki
Рет қаралды 98 МЛН
ОСКАР ИСПОРТИЛ ДЖОНИ ЖИЗНЬ 😢 @lenta_com
01:01
터키아이스크림🇹🇷🍦Turkish ice cream #funny #shorts
00:26
Byungari 병아리언니
Рет қаралды 28 МЛН
From Zero to Hero Coding Spring Boot Applications in VS Code
51:46
Visual Studio Code
Рет қаралды 10 М.
Spring Boot Project for Beginners
1:41:40
Telusko
Рет қаралды 327 М.
Step by Step Guide - VS Code for Spring Boot Java Development
39:57
Java Spring boot MongoDB REST API | VS Code | Docker | Springfox
24:53
How to create a Spring Boot Project in Visual Studio Code
16:20
Spring Boot Project With Vs Code  || Create your First Rest API
14:00
Nepal Tech Hub
Рет қаралды 14 М.
The day of the sea 🌊 🤣❤️ #demariki
00:22
Demariki
Рет қаралды 98 МЛН