際際滷

際際滷Share a Scribd company logo
Initiation the Java web application
project in Google App Engine
Artur Machura
24.12.2022, Katowice
Abstract
 Opening the presentation
 Introduction
 Main part
 Conclusion
Milestones
1. Create your project
2. Install the software needed for programming
3. Write your web service
4. Deploy your web service
Understand the basics concepts before
you start
1. Google App Engine GAE (at https://cloud.google.com/appengine,
distinguish at the outset the Google Web Toolkit GWT)
2. JAVA (this is one of the languages supported by GAE, the others are for
example Python, Go etc. https://www.java.com/ )
3. Spring (there are many projects related to this concept, e.g. spring
framework, spring boot and others https://spring.io/projects )
4. Apache Maven and Apache Tomcat (https://www.apache.org/ )
5. REST (Representational State Transfer,
https://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm )
Create your project (an option based on a web
browser is described, another is based on the
google CLI)
1. Log in to your google account (or create an account)
https://bit.ly/3GgoEYF
2. Create your first Google cloud project (https://bit.ly/3VqMCVg )
3. Activate your billing account (you get $300 initially,
https://bit.ly/3WJHgFY )
4. Enable the API (https://bit.ly/3ji2Dzu )
5. Create an App Engine application for your Cloud project
(https://bit.ly/3jlLzsl )
Install the software needed for
programming (step 1 -2)
1. Google Cloud CLI (https://cloud.google.com/sdk/docs/install )
 You must initialize it https://cloud.google.com/sdk/docs/initializing
(include command: gcloud components update)
2. Java SE 17 Development Kit
(https://www.oracle.com/java/technologies/downloads/ )
Install the software needed for
programming (step 3)
3. Apache Maven (https://maven.apache.org/download.cgi )
 To deploy using Maven, you will need to add the App Engine Maven Plugin
to yout pom.xml file
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>2.4.4</version>
</plugin>
Write your first web service, step 1 - 3
(locally on your computer)
1. Go to the Spring Iinitializr
page (https://start.spring.io/ )
2. Generate a Spring Boot
project (options in this case
are: maven, java 17)
3. Unpack it in a local folder
(to user's home directory
.m2repository)
Write your first web service, step 4
4. Modify the main class
SpringbootApplication.java (note
the filename - which is different by
default)
import org.springframework.boot.SpringApplication;
import
org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@SpringBootApplication
@RestController
public class SpringbootApplication {
public static void main(String[] args) {
SpringApplication.run(SpringbootApplication.class, args);
}
@GetMapping("/")
public String hello() {
return "Hello world!";
}
}
The modified class is a controller
that starts Spring Boot's embedded
Tomcat server and responds
to GET requests at the root path
('/') with the text "Hello world!
Write your first web service, step 4
1. Running the server locally (google CLI)
mvn spring-boot:run
2. In your web browser, enter the following address:
http://localhost:8080
! The Hello World message from the sample app displays on the page. In
your terminal window, press Ctrl+C to exit the web server.
Deploy your web service (to the cloud
platform) step 1-2
1. Add an app.yaml file to deploy your service to App Engine
(to user's home directory.m2repositoryspringbootsrcmainappengine)
2. Edit an app.yaml file
runtime: java17
Deploy your web service (to the cloud
platform) step 3
1. In your java folder, where your Maven pom.xml file is located, run the
followien command in you terminal:
gcloud app deploy
2. Viewing your service, use the following command:
gcloud app browse
My first app: https://spry-ivy-371806.lm.r.appspot.com/
Source
 Java 11/17 runtime environment
https://cloud.google.com/appengine/docs/standard/java-gen2/runtime
 and others mentioned in the presentation
Thank you for your attention! Please
submit any comments on the
software-engineers.org
PhD Artur Machura
arturmachura.info
Initiation the Java web application project in the Google App Engine

More Related Content

Similar to Initiation the Java web application project in the Google App Engine (20)

Maven Introduction
Maven IntroductionMaven Introduction
Maven Introduction
Sandeep Chawla
CSU33012-J-springboot(3) (1).pdf
CSU33012-J-springboot(3) (1).pdfCSU33012-J-springboot(3) (1).pdf
CSU33012-J-springboot(3) (1).pdf
Ricky Garg
CSU33012-J-springboot(3).pdf
CSU33012-J-springboot(3).pdfCSU33012-J-springboot(3).pdf
CSU33012-J-springboot(3).pdf
Ricky Garg
2-0. Spring ecosytem.pdf
2-0. Spring ecosytem.pdf2-0. Spring ecosytem.pdf
2-0. Spring ecosytem.pdf
DeoDuaNaoHet
Google App Engine for Python - Unit01: Basic
Google App Engine for Python - Unit01: BasicGoogle App Engine for Python - Unit01: Basic
Google App Engine for Python - Unit01: Basic
Wei-Tsung Su
What's new in p2 (2009)?
What's new in p2 (2009)?What's new in p2 (2009)?
What's new in p2 (2009)?
Pascal Rapicault
Spring boot jpa
Spring boot jpaSpring boot jpa
Spring boot jpa
Hamid Ghorbani
Spring MVC 5 & Hibernate 5 Integration
Spring MVC 5 & Hibernate 5 IntegrationSpring MVC 5 & Hibernate 5 Integration
Spring MVC 5 & Hibernate 5 Integration
Majurageerthan Arumugathasan
Andy Bosch - JavaServer Faces in the cloud
Andy Bosch -  JavaServer Faces in the cloudAndy Bosch -  JavaServer Faces in the cloud
Andy Bosch - JavaServer Faces in the cloud
Andy Bosch
Introduction to cloud-native application development: with Heroku and Spring ...
Introduction to cloud-native application development: with Heroku and Spring ...Introduction to cloud-native application development: with Heroku and Spring ...
Introduction to cloud-native application development: with Heroku and Spring ...
Roberto Casadei
Building a Spring Boot Application - Ask the Audience! (from JVMCon 2018)
Building a Spring Boot Application - Ask the Audience! (from JVMCon 2018)Building a Spring Boot Application - Ask the Audience! (from JVMCon 2018)
Building a Spring Boot Application - Ask the Audience! (from JVMCon 2018)
、 Hanno Embregts ク
Chapter 2.1
Chapter 2.1Chapter 2.1
Chapter 2.1
sotlsoc
GWT training session 1
GWT training session 1GWT training session 1
GWT training session 1
SNEHAL MASNE
Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter
Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-JupiterToolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter
Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter
Boni Garc鱈a
Spring Boot: a Quick Introduction
Spring Boot: a Quick IntroductionSpring Boot: a Quick Introduction
Spring Boot: a Quick Introduction
Roberto Casadei
Rest web service_with_spring_hateoas
Rest web service_with_spring_hateoasRest web service_with_spring_hateoas
Rest web service_with_spring_hateoas
Zeid Hassan
Meetup 2022 - APIs with Quarkus.pdf
Meetup 2022 - APIs with Quarkus.pdfMeetup 2022 - APIs with Quarkus.pdf
Meetup 2022 - APIs with Quarkus.pdf
Red Hat
Modular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSModular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJS
Gunnar Hillert
Spring MVC 5 & Hibernate 5 Integration.pdf
Spring MVC 5 & Hibernate 5 Integration.pdfSpring MVC 5 & Hibernate 5 Integration.pdf
Spring MVC 5 & Hibernate 5 Integration.pdf
Patiento Del Mar
How to create your first project in spring using eclipse
How to create your first project in spring using eclipseHow to create your first project in spring using eclipse
How to create your first project in spring using eclipse
Rajorshi Mukherjee
CSU33012-J-springboot(3) (1).pdf
CSU33012-J-springboot(3) (1).pdfCSU33012-J-springboot(3) (1).pdf
CSU33012-J-springboot(3) (1).pdf
Ricky Garg
CSU33012-J-springboot(3).pdf
CSU33012-J-springboot(3).pdfCSU33012-J-springboot(3).pdf
CSU33012-J-springboot(3).pdf
Ricky Garg
2-0. Spring ecosytem.pdf
2-0. Spring ecosytem.pdf2-0. Spring ecosytem.pdf
2-0. Spring ecosytem.pdf
DeoDuaNaoHet
Google App Engine for Python - Unit01: Basic
Google App Engine for Python - Unit01: BasicGoogle App Engine for Python - Unit01: Basic
Google App Engine for Python - Unit01: Basic
Wei-Tsung Su
What's new in p2 (2009)?
What's new in p2 (2009)?What's new in p2 (2009)?
What's new in p2 (2009)?
Pascal Rapicault
Andy Bosch - JavaServer Faces in the cloud
Andy Bosch -  JavaServer Faces in the cloudAndy Bosch -  JavaServer Faces in the cloud
Andy Bosch - JavaServer Faces in the cloud
Andy Bosch
Introduction to cloud-native application development: with Heroku and Spring ...
Introduction to cloud-native application development: with Heroku and Spring ...Introduction to cloud-native application development: with Heroku and Spring ...
Introduction to cloud-native application development: with Heroku and Spring ...
Roberto Casadei
Building a Spring Boot Application - Ask the Audience! (from JVMCon 2018)
Building a Spring Boot Application - Ask the Audience! (from JVMCon 2018)Building a Spring Boot Application - Ask the Audience! (from JVMCon 2018)
Building a Spring Boot Application - Ask the Audience! (from JVMCon 2018)
、 Hanno Embregts ク
Chapter 2.1
Chapter 2.1Chapter 2.1
Chapter 2.1
sotlsoc
GWT training session 1
GWT training session 1GWT training session 1
GWT training session 1
SNEHAL MASNE
Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter
Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-JupiterToolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter
Toolbox for Selenium Tests in Java: WebDriverManager and Selenium-Jupiter
Boni Garc鱈a
Spring Boot: a Quick Introduction
Spring Boot: a Quick IntroductionSpring Boot: a Quick Introduction
Spring Boot: a Quick Introduction
Roberto Casadei
Rest web service_with_spring_hateoas
Rest web service_with_spring_hateoasRest web service_with_spring_hateoas
Rest web service_with_spring_hateoas
Zeid Hassan
Meetup 2022 - APIs with Quarkus.pdf
Meetup 2022 - APIs with Quarkus.pdfMeetup 2022 - APIs with Quarkus.pdf
Meetup 2022 - APIs with Quarkus.pdf
Red Hat
Modular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSModular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJS
Gunnar Hillert
Spring MVC 5 & Hibernate 5 Integration.pdf
Spring MVC 5 & Hibernate 5 Integration.pdfSpring MVC 5 & Hibernate 5 Integration.pdf
Spring MVC 5 & Hibernate 5 Integration.pdf
Patiento Del Mar
How to create your first project in spring using eclipse
How to create your first project in spring using eclipseHow to create your first project in spring using eclipse
How to create your first project in spring using eclipse
Rajorshi Mukherjee

More from University of Economics in Katowice (20)

python_function.pdf
python_function.pdfpython_function.pdf
python_function.pdf
University of Economics in Katowice
python_p4_v2.pdf
python_p4_v2.pdfpython_p4_v2.pdf
python_p4_v2.pdf
University of Economics in Katowice
python_p3.pdf
python_p3.pdfpython_p3.pdf
python_p3.pdf
University of Economics in Katowice
python_p2v2_publikacja.pdf
python_p2v2_publikacja.pdfpython_p2v2_publikacja.pdf
python_p2v2_publikacja.pdf
University of Economics in Katowice
python_p1.pdf
python_p1.pdfpython_p1.pdf
python_p1.pdf
University of Economics in Katowice
TechnologyStack_basicsv2.pdf
TechnologyStack_basicsv2.pdfTechnologyStack_basicsv2.pdf
TechnologyStack_basicsv2.pdf
University of Economics in Katowice
barplotv4.pdf
barplotv4.pdfbarplotv4.pdf
barplotv4.pdf
University of Economics in Katowice
ie.pdf
ie.pdfie.pdf
ie.pdf
University of Economics in Katowice
沿顎.沿沿岳
沿顎.沿沿岳沿顎.沿沿岳
沿顎.沿沿岳
University of Economics in Katowice
swd.pdf
swd.pdfswd.pdf
swd.pdf
University of Economics in Katowice
EARv3.pdf
EARv3.pdfEARv3.pdf
EARv3.pdf
University of Economics in Katowice
Projektowanie i implementacja usug sieciowych
Projektowanie i implementacja usug sieciowychProjektowanie i implementacja usug sieciowych
Projektowanie i implementacja usug sieciowych
University of Economics in Katowice
Angular10302021
Angular10302021Angular10302021
Angular10302021
University of Economics in Katowice
rodowisko PWA
rodowisko PWArodowisko PWA
rodowisko PWA
University of Economics in Katowice
Kolo REST
Kolo RESTKolo REST
Kolo REST
University of Economics in Katowice
Inicjacja wg OpenUP
Inicjacja wg OpenUPInicjacja wg OpenUP
Inicjacja wg OpenUP
University of Economics in Katowice
Dyscyplina zarzdzania projektami wg OpenUP
Dyscyplina zarzdzania projektami wg OpenUPDyscyplina zarzdzania projektami wg OpenUP
Dyscyplina zarzdzania projektami wg OpenUP
University of Economics in Katowice
Atrybut zgodnoci
Atrybut zgodnociAtrybut zgodnoci
Atrybut zgodnoci
University of Economics in Katowice
Wstp do dyscypliny wymaga w projektach IT
Wstp do dyscypliny wymaga w projektach ITWstp do dyscypliny wymaga w projektach IT
Wstp do dyscypliny wymaga w projektach IT
University of Economics in Katowice
Projektowanie systemowinformatycznychprezentacjabazowa
Projektowanie systemowinformatycznychprezentacjabazowaProjektowanie systemowinformatycznychprezentacjabazowa
Projektowanie systemowinformatycznychprezentacjabazowa
University of Economics in Katowice

Recently uploaded (20)

Essentials of a Good PMO, presented by Aalok Sonawala
Essentials of a Good PMO, presented by Aalok SonawalaEssentials of a Good PMO, presented by Aalok Sonawala
Essentials of a Good PMO, presented by Aalok Sonawala
Association for Project Management
How to use Init Hooks in Odoo 18 - Odoo 際際滷s
How to use Init Hooks in Odoo 18 - Odoo 際際滷sHow to use Init Hooks in Odoo 18 - Odoo 際際滷s
How to use Init Hooks in Odoo 18 - Odoo 際際滷s
Celine George
How to Manage Putaway Rule in Odoo 17 Inventory
How to Manage Putaway Rule in Odoo 17 InventoryHow to Manage Putaway Rule in Odoo 17 Inventory
How to Manage Putaway Rule in Odoo 17 Inventory
Celine George
TLE 7 - 2nd Topic - Codes and Standards in Industrial Arts Services.pptx
TLE 7 - 2nd Topic - Codes and Standards in Industrial Arts Services.pptxTLE 7 - 2nd Topic - Codes and Standards in Industrial Arts Services.pptx
TLE 7 - 2nd Topic - Codes and Standards in Industrial Arts Services.pptx
RizaBedayo
Digital Tools with AI for e-Content Development.pptx
Digital Tools with AI for e-Content Development.pptxDigital Tools with AI for e-Content Development.pptx
Digital Tools with AI for e-Content Development.pptx
Dr. Sarita Anand
Rass MELAI : an Internet MELA Quiz Prelims - El Dorado 2025
Rass MELAI : an Internet MELA Quiz Prelims - El Dorado 2025Rass MELAI : an Internet MELA Quiz Prelims - El Dorado 2025
Rass MELAI : an Internet MELA Quiz Prelims - El Dorado 2025
Conquiztadors- the Quiz Society of Sri Venkateswara College
TPR Data strategy 2025 (1).pdf Data strategy
TPR Data strategy 2025 (1).pdf Data strategyTPR Data strategy 2025 (1).pdf Data strategy
TPR Data strategy 2025 (1).pdf Data strategy
Henry Tapper
The Broccoli Dog's inner voice (look A)
The Broccoli Dog's inner voice  (look A)The Broccoli Dog's inner voice  (look A)
The Broccoli Dog's inner voice (look A)
merasan
How to Configure Flexible Working Schedule in Odoo 18 Employee
How to Configure Flexible Working Schedule in Odoo 18 EmployeeHow to Configure Flexible Working Schedule in Odoo 18 Employee
How to Configure Flexible Working Schedule in Odoo 18 Employee
Celine George
Lesson Plan M1 2024 Lesson Plan M1 2024 Lesson Plan M1 2024 Lesson Plan M1...
Lesson Plan M1 2024  Lesson Plan M1 2024  Lesson Plan M1 2024  Lesson Plan M1...Lesson Plan M1 2024  Lesson Plan M1 2024  Lesson Plan M1 2024  Lesson Plan M1...
Lesson Plan M1 2024 Lesson Plan M1 2024 Lesson Plan M1 2024 Lesson Plan M1...
pinkdvil200
Principle and Practices of Animal Breeding || Boby Basnet
Principle and Practices of Animal Breeding || Boby BasnetPrinciple and Practices of Animal Breeding || Boby Basnet
Principle and Practices of Animal Breeding || Boby Basnet
Boby Basnet
Blind Spots in AI and Formulation Science Knowledge Pyramid (Updated Perspect...
Blind Spots in AI and Formulation Science Knowledge Pyramid (Updated Perspect...Blind Spots in AI and Formulation Science Knowledge Pyramid (Updated Perspect...
Blind Spots in AI and Formulation Science Knowledge Pyramid (Updated Perspect...
Ajaz Hussain
CBSE Arabic Grammar - Class 10 ppt.pptx
CBSE Arabic Grammar - Class 10   ppt.pptxCBSE Arabic Grammar - Class 10   ppt.pptx
CBSE Arabic Grammar - Class 10 ppt.pptx
suhail849886
Year 10 The Senior Phase Session 3 Term 1.pptx
Year 10 The Senior Phase Session 3 Term 1.pptxYear 10 The Senior Phase Session 3 Term 1.pptx
Year 10 The Senior Phase Session 3 Term 1.pptx
mansk2
PUBH1000 Module 3: Public Health Systems
PUBH1000 Module 3: Public Health SystemsPUBH1000 Module 3: Public Health Systems
PUBH1000 Module 3: Public Health Systems
Jonathan Hallett
Modeling-Simple-Equation-Using-Bar-Models.pptx
Modeling-Simple-Equation-Using-Bar-Models.pptxModeling-Simple-Equation-Using-Bar-Models.pptx
Modeling-Simple-Equation-Using-Bar-Models.pptx
maribethlacno2
The Story Behind the Abney Park Restoration Project by Tom Walker
The Story Behind the Abney Park Restoration Project by Tom WalkerThe Story Behind the Abney Park Restoration Project by Tom Walker
The Story Behind the Abney Park Restoration Project by Tom Walker
History of Stoke Newington
Eng7-Q4-Lesson 1 Part 1 Understanding Discipline-Specific Words, Voice, and T...
Eng7-Q4-Lesson 1 Part 1 Understanding Discipline-Specific Words, Voice, and T...Eng7-Q4-Lesson 1 Part 1 Understanding Discipline-Specific Words, Voice, and T...
Eng7-Q4-Lesson 1 Part 1 Understanding Discipline-Specific Words, Voice, and T...
sandynavergas1
Rass MELAI : an Internet MELA Quiz Finals - El Dorado 2025
Rass MELAI : an Internet MELA Quiz Finals - El Dorado 2025Rass MELAI : an Internet MELA Quiz Finals - El Dorado 2025
Rass MELAI : an Internet MELA Quiz Finals - El Dorado 2025
Conquiztadors- the Quiz Society of Sri Venkateswara College
Useful environment methods in Odoo 18 - Odoo 際際滷s
Useful environment methods in Odoo 18 - Odoo 際際滷sUseful environment methods in Odoo 18 - Odoo 際際滷s
Useful environment methods in Odoo 18 - Odoo 際際滷s
Celine George
How to use Init Hooks in Odoo 18 - Odoo 際際滷s
How to use Init Hooks in Odoo 18 - Odoo 際際滷sHow to use Init Hooks in Odoo 18 - Odoo 際際滷s
How to use Init Hooks in Odoo 18 - Odoo 際際滷s
Celine George
How to Manage Putaway Rule in Odoo 17 Inventory
How to Manage Putaway Rule in Odoo 17 InventoryHow to Manage Putaway Rule in Odoo 17 Inventory
How to Manage Putaway Rule in Odoo 17 Inventory
Celine George
TLE 7 - 2nd Topic - Codes and Standards in Industrial Arts Services.pptx
TLE 7 - 2nd Topic - Codes and Standards in Industrial Arts Services.pptxTLE 7 - 2nd Topic - Codes and Standards in Industrial Arts Services.pptx
TLE 7 - 2nd Topic - Codes and Standards in Industrial Arts Services.pptx
RizaBedayo
Digital Tools with AI for e-Content Development.pptx
Digital Tools with AI for e-Content Development.pptxDigital Tools with AI for e-Content Development.pptx
Digital Tools with AI for e-Content Development.pptx
Dr. Sarita Anand
TPR Data strategy 2025 (1).pdf Data strategy
TPR Data strategy 2025 (1).pdf Data strategyTPR Data strategy 2025 (1).pdf Data strategy
TPR Data strategy 2025 (1).pdf Data strategy
Henry Tapper
The Broccoli Dog's inner voice (look A)
The Broccoli Dog's inner voice  (look A)The Broccoli Dog's inner voice  (look A)
The Broccoli Dog's inner voice (look A)
merasan
How to Configure Flexible Working Schedule in Odoo 18 Employee
How to Configure Flexible Working Schedule in Odoo 18 EmployeeHow to Configure Flexible Working Schedule in Odoo 18 Employee
How to Configure Flexible Working Schedule in Odoo 18 Employee
Celine George
Lesson Plan M1 2024 Lesson Plan M1 2024 Lesson Plan M1 2024 Lesson Plan M1...
Lesson Plan M1 2024  Lesson Plan M1 2024  Lesson Plan M1 2024  Lesson Plan M1...Lesson Plan M1 2024  Lesson Plan M1 2024  Lesson Plan M1 2024  Lesson Plan M1...
Lesson Plan M1 2024 Lesson Plan M1 2024 Lesson Plan M1 2024 Lesson Plan M1...
pinkdvil200
Principle and Practices of Animal Breeding || Boby Basnet
Principle and Practices of Animal Breeding || Boby BasnetPrinciple and Practices of Animal Breeding || Boby Basnet
Principle and Practices of Animal Breeding || Boby Basnet
Boby Basnet
Blind Spots in AI and Formulation Science Knowledge Pyramid (Updated Perspect...
Blind Spots in AI and Formulation Science Knowledge Pyramid (Updated Perspect...Blind Spots in AI and Formulation Science Knowledge Pyramid (Updated Perspect...
Blind Spots in AI and Formulation Science Knowledge Pyramid (Updated Perspect...
Ajaz Hussain
CBSE Arabic Grammar - Class 10 ppt.pptx
CBSE Arabic Grammar - Class 10   ppt.pptxCBSE Arabic Grammar - Class 10   ppt.pptx
CBSE Arabic Grammar - Class 10 ppt.pptx
suhail849886
Year 10 The Senior Phase Session 3 Term 1.pptx
Year 10 The Senior Phase Session 3 Term 1.pptxYear 10 The Senior Phase Session 3 Term 1.pptx
Year 10 The Senior Phase Session 3 Term 1.pptx
mansk2
PUBH1000 Module 3: Public Health Systems
PUBH1000 Module 3: Public Health SystemsPUBH1000 Module 3: Public Health Systems
PUBH1000 Module 3: Public Health Systems
Jonathan Hallett
Modeling-Simple-Equation-Using-Bar-Models.pptx
Modeling-Simple-Equation-Using-Bar-Models.pptxModeling-Simple-Equation-Using-Bar-Models.pptx
Modeling-Simple-Equation-Using-Bar-Models.pptx
maribethlacno2
The Story Behind the Abney Park Restoration Project by Tom Walker
The Story Behind the Abney Park Restoration Project by Tom WalkerThe Story Behind the Abney Park Restoration Project by Tom Walker
The Story Behind the Abney Park Restoration Project by Tom Walker
History of Stoke Newington
Eng7-Q4-Lesson 1 Part 1 Understanding Discipline-Specific Words, Voice, and T...
Eng7-Q4-Lesson 1 Part 1 Understanding Discipline-Specific Words, Voice, and T...Eng7-Q4-Lesson 1 Part 1 Understanding Discipline-Specific Words, Voice, and T...
Eng7-Q4-Lesson 1 Part 1 Understanding Discipline-Specific Words, Voice, and T...
sandynavergas1
Useful environment methods in Odoo 18 - Odoo 際際滷s
Useful environment methods in Odoo 18 - Odoo 際際滷sUseful environment methods in Odoo 18 - Odoo 際際滷s
Useful environment methods in Odoo 18 - Odoo 際際滷s
Celine George

Initiation the Java web application project in the Google App Engine

  • 1. Initiation the Java web application project in Google App Engine Artur Machura 24.12.2022, Katowice
  • 2. Abstract Opening the presentation Introduction Main part Conclusion
  • 3. Milestones 1. Create your project 2. Install the software needed for programming 3. Write your web service 4. Deploy your web service
  • 4. Understand the basics concepts before you start 1. Google App Engine GAE (at https://cloud.google.com/appengine, distinguish at the outset the Google Web Toolkit GWT) 2. JAVA (this is one of the languages supported by GAE, the others are for example Python, Go etc. https://www.java.com/ ) 3. Spring (there are many projects related to this concept, e.g. spring framework, spring boot and others https://spring.io/projects ) 4. Apache Maven and Apache Tomcat (https://www.apache.org/ ) 5. REST (Representational State Transfer, https://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm )
  • 5. Create your project (an option based on a web browser is described, another is based on the google CLI) 1. Log in to your google account (or create an account) https://bit.ly/3GgoEYF 2. Create your first Google cloud project (https://bit.ly/3VqMCVg ) 3. Activate your billing account (you get $300 initially, https://bit.ly/3WJHgFY ) 4. Enable the API (https://bit.ly/3ji2Dzu ) 5. Create an App Engine application for your Cloud project (https://bit.ly/3jlLzsl )
  • 6. Install the software needed for programming (step 1 -2) 1. Google Cloud CLI (https://cloud.google.com/sdk/docs/install ) You must initialize it https://cloud.google.com/sdk/docs/initializing (include command: gcloud components update) 2. Java SE 17 Development Kit (https://www.oracle.com/java/technologies/downloads/ )
  • 7. Install the software needed for programming (step 3) 3. Apache Maven (https://maven.apache.org/download.cgi ) To deploy using Maven, you will need to add the App Engine Maven Plugin to yout pom.xml file <plugin> <groupId>com.google.cloud.tools</groupId> <artifactId>appengine-maven-plugin</artifactId> <version>2.4.4</version> </plugin>
  • 8. Write your first web service, step 1 - 3 (locally on your computer) 1. Go to the Spring Iinitializr page (https://start.spring.io/ ) 2. Generate a Spring Boot project (options in this case are: maven, java 17) 3. Unpack it in a local folder (to user's home directory .m2repository)
  • 9. Write your first web service, step 4 4. Modify the main class SpringbootApplication.java (note the filename - which is different by default) import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; @SpringBootApplication @RestController public class SpringbootApplication { public static void main(String[] args) { SpringApplication.run(SpringbootApplication.class, args); } @GetMapping("/") public String hello() { return "Hello world!"; } } The modified class is a controller that starts Spring Boot's embedded Tomcat server and responds to GET requests at the root path ('/') with the text "Hello world!
  • 10. Write your first web service, step 4 1. Running the server locally (google CLI) mvn spring-boot:run 2. In your web browser, enter the following address: http://localhost:8080 ! The Hello World message from the sample app displays on the page. In your terminal window, press Ctrl+C to exit the web server.
  • 11. Deploy your web service (to the cloud platform) step 1-2 1. Add an app.yaml file to deploy your service to App Engine (to user's home directory.m2repositoryspringbootsrcmainappengine) 2. Edit an app.yaml file runtime: java17
  • 12. Deploy your web service (to the cloud platform) step 3 1. In your java folder, where your Maven pom.xml file is located, run the followien command in you terminal: gcloud app deploy 2. Viewing your service, use the following command: gcloud app browse My first app: https://spry-ivy-371806.lm.r.appspot.com/
  • 13. Source Java 11/17 runtime environment https://cloud.google.com/appengine/docs/standard/java-gen2/runtime and others mentioned in the presentation
  • 14. Thank you for your attention! Please submit any comments on the software-engineers.org PhD Artur Machura arturmachura.info