MarCT Java Internship - Day2 basics of Web & SpringBoot

  Рет қаралды 2,689

Tausief S

Tausief S

Күн бұрын

Web application....
Accessible over internet.
Java - core java, adv java
Build a web application, which can be assible over internet.
Client:
web applicaiton, so we can do business
develop functional application
Something readmade, easy to apply, which converts java application into an web application.
Web frameworks.
Spring Boot.
Microservice architecture
I want to run end-to-end web application using Spring Boot.
jdbc...
"
core java...
+
jar file provided by ojdbc.jar,
"
classpath
database oracle/mysql
Spring boot:
50+ jar file
100+ jar file
Dependencies:
abc.jar
200 java classes
pqr.jar
xyz.jar
tool/software
Build tools.
We would use Maven as a build tool, to add all spring boot dependencies to our java applicaiton. And transform it into web application.
A.java
compile
execute
javac A.java
java A
by executable jar file.
myjar.jar ... .war
A.class
java -jar myjar.jar
creation of executable jar. Using Maven
maven commands
mvn package
=] myapp.jar
java -jar myapp.jar
Start tomcat
run our web applicaiton here.
you can execute web applicaiton in webserver - httpserver
IDE: Eclipse STS
Java 17
Maven
1. Building Spring Boot application
2. run it locally & test
3. Setting up in AWS & execute there.
Mandatory server.
By Default, we would give you embeded tomcat in your spring boot application.
start.spring.io/
fill up data.
Add dependency: WEB.
Group:
Which company is developing that project.
accenture.com (Client)
group: com.accenture
com.google
Generate readmade project code.
myapp.zip
-------
IDE:
D:\mar24ct-workspace
Include the generate project into IDE.
MAVEN Project.
maven configuration: pom.xml
IDE Import.
Basic maven commands
mvn clean
mvn install =] new depedency
mvn package =] jar
mvn clean package
deleted existing
complied java classes
Created new jar file (target)
How to execute these commands from IDE.
rt click project =] Run As =] Maven build...
popup:
Goal:
Execute (Embeded Tomcat)
How do you run/execture it in local machine
mvn clean spring-boot:run - web applicaiton came up and its running on 8080 port.
Tomcat started on port 8080
Default port for Spring Boot.
How do you access it?
Browser.
8080
What should be my brower url.
localhost:8080/
127.0.0.1:8080/
127.0.0.1 | 127.255.255.254
3rd way:
ipconfig - public ip of your machine
IPv4 Address:
172.17.48.1:8080/
[machine ip where code is running]:[port]
Default port is 8080 - change it to 8081
2 services cannot run on same port.
Either you start it on another port.
or you kill existing service, & start new service on that port.
Identify and stop the process that's listening on port 8081 or configure this application to listen on another port.
How do you deploy & give to the real world.
-----
Infra: Cloud infra - AWS
myapp.jar
deploy this in AWS EC2 service
1. In AWS setup & start EC2
2. Do deployment in EC2.
Local myapp.jar =] AWS.
3. Mobaxterm []
connect to AWS EC2 - ssh
copy Local myapp.jar =] AWS. "scp"
terminal
basic linux command
scp ./jarfilename.jar ec2-user@43.205.240.11:/home/ec2-user
ssh ec2-user@43.205.240.11
nohup java -jar -Xms100M -Xmx150M myapp-0.0.1-SNAPSHOT.jar ] firstspring-0.0.1.jar.log &
Tomcat started on port 8080

Пікірлер: 10
@galaxy1575
@galaxy1575 4 ай бұрын
Sir please upload all videos of 2months regularly .
@TausiefS
@TausiefS 4 ай бұрын
ALl Week1 videos would be uploaded. And from Week2, the videos would be shared with enrolled members.
@aresrikar8653
@aresrikar8653 4 ай бұрын
bro whats the company name which will be mentioned on the certificate ?
@TausiefS
@TausiefS 4 ай бұрын
will share the name.. during tomorrows live session. Where we would discuss on enrollment
@Rubiya_Sheikh
@Rubiya_Sheikh 4 ай бұрын
Sir your voice is very low. Please use better mic 🎤
@TausiefS
@TausiefS 4 ай бұрын
will check. thanks
@surya2557
@surya2557 4 ай бұрын
Sir payment link is not working
@TausiefS
@TausiefS 4 ай бұрын
Pleaes note, we enabled Payment Link till 10Mar EOD. You can enroll below pages.razorpay.com/pl_NYmUuRovPb92yR/view
@poornimabhallal5495
@poornimabhallal5495 4 ай бұрын
​@@TausiefSbro please extend payment date bro. I will pay next week bro. I am present working to voice process 😔 bro. But present i don't have money bro.i will pay to next week. Salary timeing 15th bro. Please extend bro.🙏🙏🙏
@smartsri1537
@smartsri1537 2 ай бұрын
How much payment sir
Coding a Web Server in 25 Lines - Computerphile
17:49
Computerphile
Рет қаралды 328 М.
4 Spring Boot Mistakes to AVOID in 2024
15:18
Java Brains
Рет қаралды 55 М.
БОЛЬШОЙ ПЕТУШОК #shorts
00:21
Паша Осадчий
Рет қаралды 10 МЛН
🤔Какой Орган самый длинный ? #shorts
00:42
Why I Chose Rust Over Zig
33:18
ThePrimeTime
Рет қаралды 30 М.
MarCT - Java Internship - Day1
1:21:27
Tausief S
Рет қаралды 7 М.
Training Your Own AI Model Is Not As Hard As You (Probably) Think
10:24
Steve (Builder.io)
Рет қаралды 469 М.
What is JWT? JSON Web Tokens Explained (Java Brains)
14:53
Java Brains
Рет қаралды 1 МЛН
FASTEST Way To Learn Coding and ACTUALLY Get A Job
10:44
Brian Cache
Рет қаралды 985 М.
Microservices using SpringBoot 3.0 | Full Example [NEW]
1:25:38
Daily Code Buffer
Рет қаралды 172 М.
Senior Angular Developer Interview (theory)
41:57
WeCoded
Рет қаралды 11 М.
Introduction to Maven and its Lifecycle | Spring boot Maven project
48:32
Concept && Coding - by Shrayansh
Рет қаралды 25 М.
What is Spring-Boot Framework? (explained from scratch)
4:46
Visual Computer Science
Рет қаралды 187 М.
БОЛЬШОЙ ПЕТУШОК #shorts
00:21
Паша Осадчий
Рет қаралды 10 МЛН