SlideShare a Scribd company logo
1 of 18
Download to read offline
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
5. Additionally - Continued work in STS4
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
Continue work in STS4 (step 1)
1. Download and install STS 4
https://spring.io/tools
2. Import your first project
(file>import>Maven>Existing
Projects)
Continue work in STS4 (step 2)
1. Make any changes, e.g. the text
„Hello world! STS4” (it was in
SpringbootApplication.java class)
2. Check on your local server to see if
it works
• Run „Spring Boot App” (from menu
STS4)
• Check website (by default it is an
adress http://localhost:8080/)
Continue work in STS4 (step 3)
1. In google CLI deploy your service (but if you have been logged out in
the meantime, you will have to log in and set up the project).
• gcloud auth login
• gcloud config set project …
• gcloud app deploy (make sure you are in the project directory where the
pom.xml file is located)
2. Check you project address
• gcloud app browse
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
InitiateAEv2.pdf

More Related Content

What's hot

Tim hieu ve lo hong web va cach phong chong
Tim hieu ve lo hong web va cach phong chongTim hieu ve lo hong web va cach phong chong
Tim hieu ve lo hong web va cach phong chongVu Trung Kien
 
Exploitation of counter overflows in the Linux kernel
Exploitation of counter overflows in the Linux kernelExploitation of counter overflows in the Linux kernel
Exploitation of counter overflows in the Linux kernelVitaly Nikolenko
 
Kỹ thuật tìm kiếm thông tin trên Google
Kỹ thuật tìm kiếm thông tin trên GoogleKỹ thuật tìm kiếm thông tin trên Google
Kỹ thuật tìm kiếm thông tin trên GoogleHoàng Hiệp Lại
 
Hướng dẫn đổi tên máy domain controller
Hướng dẫn đổi tên máy domain controllerHướng dẫn đổi tên máy domain controller
Hướng dẫn đổi tên máy domain controllerlaonap166
 
Turbo C Graphics and Mouse Programming
Turbo C Graphics and Mouse ProgrammingTurbo C Graphics and Mouse Programming
Turbo C Graphics and Mouse ProgrammingHuzaifa Butt
 
End to End IoT projects with Zephyr.pdf
End to End IoT projects with Zephyr.pdfEnd to End IoT projects with Zephyr.pdf
End to End IoT projects with Zephyr.pdfAlvaro Viebrantz
 
Iso12207:2008 standard
Iso12207:2008 standardIso12207:2008 standard
Iso12207:2008 standardMaria Akther
 
Python Pandas.pptx
Python Pandas.pptxPython Pandas.pptx
Python Pandas.pptxSujayaBiju
 
Dự Đoán Lỗ Hổng Phần Mềm Dựa Trên Kỹ Thuật Khai Phá Dữ Liệu _08300812092019
Dự Đoán Lỗ Hổng Phần Mềm Dựa Trên Kỹ Thuật Khai Phá Dữ Liệu _08300812092019Dự Đoán Lỗ Hổng Phần Mềm Dựa Trên Kỹ Thuật Khai Phá Dữ Liệu _08300812092019
Dự Đoán Lỗ Hổng Phần Mềm Dựa Trên Kỹ Thuật Khai Phá Dữ Liệu _08300812092019hanhha12
 
Güvenlik Testlerinde Bilgi Toplama
Güvenlik Testlerinde Bilgi ToplamaGüvenlik Testlerinde Bilgi Toplama
Güvenlik Testlerinde Bilgi ToplamaBGA Cyber Security
 
Exécution Symbolique
Exécution SymboliqueExécution Symbolique
Exécution SymboliqueIlhem Daoudi
 
Golang Project Layout and Practice
Golang Project Layout and PracticeGolang Project Layout and Practice
Golang Project Layout and PracticeBo-Yi Wu
 
Konfigurasi https pada debian 7
Konfigurasi https pada debian 7Konfigurasi https pada debian 7
Konfigurasi https pada debian 7CyberSpace
 
Hacklenmiş Web Sunucu Analizi
Hacklenmiş Web Sunucu AnaliziHacklenmiş Web Sunucu Analizi
Hacklenmiş Web Sunucu AnaliziBGA Cyber Security
 
Practical Windows Kernel Exploitation
Practical Windows Kernel ExploitationPractical Windows Kernel Exploitation
Practical Windows Kernel ExploitationzeroSteiner
 

What's hot (20)

Tim hieu ve lo hong web va cach phong chong
Tim hieu ve lo hong web va cach phong chongTim hieu ve lo hong web va cach phong chong
Tim hieu ve lo hong web va cach phong chong
 
Exploitation of counter overflows in the Linux kernel
Exploitation of counter overflows in the Linux kernelExploitation of counter overflows in the Linux kernel
Exploitation of counter overflows in the Linux kernel
 
Kỹ thuật tìm kiếm thông tin trên Google
Kỹ thuật tìm kiếm thông tin trên GoogleKỹ thuật tìm kiếm thông tin trên Google
Kỹ thuật tìm kiếm thông tin trên Google
 
Hướng dẫn đổi tên máy domain controller
Hướng dẫn đổi tên máy domain controllerHướng dẫn đổi tên máy domain controller
Hướng dẫn đổi tên máy domain controller
 
Turbo C Graphics and Mouse Programming
Turbo C Graphics and Mouse ProgrammingTurbo C Graphics and Mouse Programming
Turbo C Graphics and Mouse Programming
 
End to End IoT projects with Zephyr.pdf
End to End IoT projects with Zephyr.pdfEnd to End IoT projects with Zephyr.pdf
End to End IoT projects with Zephyr.pdf
 
Iso12207:2008 standard
Iso12207:2008 standardIso12207:2008 standard
Iso12207:2008 standard
 
Python Pandas.pptx
Python Pandas.pptxPython Pandas.pptx
Python Pandas.pptx
 
firewall
firewallfirewall
firewall
 
TỰ HỌC LPI 2
TỰ HỌC LPI 2TỰ HỌC LPI 2
TỰ HỌC LPI 2
 
Dự Đoán Lỗ Hổng Phần Mềm Dựa Trên Kỹ Thuật Khai Phá Dữ Liệu _08300812092019
Dự Đoán Lỗ Hổng Phần Mềm Dựa Trên Kỹ Thuật Khai Phá Dữ Liệu _08300812092019Dự Đoán Lỗ Hổng Phần Mềm Dựa Trên Kỹ Thuật Khai Phá Dữ Liệu _08300812092019
Dự Đoán Lỗ Hổng Phần Mềm Dựa Trên Kỹ Thuật Khai Phá Dữ Liệu _08300812092019
 
Android Internals
Android InternalsAndroid Internals
Android Internals
 
Güvenlik Testlerinde Bilgi Toplama
Güvenlik Testlerinde Bilgi ToplamaGüvenlik Testlerinde Bilgi Toplama
Güvenlik Testlerinde Bilgi Toplama
 
Lab lap trinhmang_v3
Lab lap trinhmang_v3Lab lap trinhmang_v3
Lab lap trinhmang_v3
 
200 đề tài luận văn thạc sĩ an ninh mạng. HAY
200 đề tài luận văn thạc sĩ an ninh mạng. HAY200 đề tài luận văn thạc sĩ an ninh mạng. HAY
200 đề tài luận văn thạc sĩ an ninh mạng. HAY
 
Exécution Symbolique
Exécution SymboliqueExécution Symbolique
Exécution Symbolique
 
Golang Project Layout and Practice
Golang Project Layout and PracticeGolang Project Layout and Practice
Golang Project Layout and Practice
 
Konfigurasi https pada debian 7
Konfigurasi https pada debian 7Konfigurasi https pada debian 7
Konfigurasi https pada debian 7
 
Hacklenmiş Web Sunucu Analizi
Hacklenmiş Web Sunucu AnaliziHacklenmiş Web Sunucu Analizi
Hacklenmiş Web Sunucu Analizi
 
Practical Windows Kernel Exploitation
Practical Windows Kernel ExploitationPractical Windows Kernel Exploitation
Practical Windows Kernel Exploitation
 

Similar to InitiateAEv2.pdf

Initiation the Java web application project in the Google App Engine
Initiation the Java web application project in the Google App EngineInitiation the Java web application project in the Google App Engine
Initiation the Java web application project in the Google App EngineUniversity of Economics in Katowice
 
dokumen.tips_introduction-to-spring-boot-58bb649a21ce5.pptx
dokumen.tips_introduction-to-spring-boot-58bb649a21ce5.pptxdokumen.tips_introduction-to-spring-boot-58bb649a21ce5.pptx
dokumen.tips_introduction-to-spring-boot-58bb649a21ce5.pptxAppster1
 
Spring hibernate tutorial
Spring hibernate tutorialSpring hibernate tutorial
Spring hibernate tutorialRohit Jagtap
 
Django simplified : by weever mbakaya
Django simplified : by weever mbakayaDjango simplified : by weever mbakaya
Django simplified : by weever mbakayaMbakaya Kwatukha
 
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-AppsSelenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-Appschrisb206 chrisb206
 
BLCN532 Lab 1Set up your development environmentV2.0.docx
BLCN532 Lab 1Set up your development environmentV2.0.docxBLCN532 Lab 1Set up your development environmentV2.0.docx
BLCN532 Lab 1Set up your development environmentV2.0.docxmoirarandell
 
Opensource gis development - part 1
Opensource gis development - part 1Opensource gis development - part 1
Opensource gis development - part 1Andrea Antonello
 
Maven: Managing Software Projects for Repeatable Results
Maven: Managing Software Projects for Repeatable ResultsMaven: Managing Software Projects for Repeatable Results
Maven: Managing Software Projects for Repeatable ResultsSteve Keener
 
How to use_cucumber_rest-assured_api_framework
How to use_cucumber_rest-assured_api_frameworkHow to use_cucumber_rest-assured_api_framework
How to use_cucumber_rest-assured_api_frameworkHarshad Ingle
 
SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...
SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...
SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...Sencha
 
Testing Java Web Apps With Selenium
Testing Java Web Apps With SeleniumTesting Java Web Apps With Selenium
Testing Java Web Apps With SeleniumMarakana Inc.
 
Spring Live Sample Chapter
Spring Live Sample ChapterSpring Live Sample Chapter
Spring Live Sample ChapterSyed Shahul
 
Building a Spring Boot Application - Ask the Audience!
Building a Spring Boot Application - Ask the Audience!Building a Spring Boot Application - Ask the Audience!
Building a Spring Boot Application - Ask the Audience!🎤 Hanno Embregts 🎸
 

Similar to InitiateAEv2.pdf (20)

Initiation the Java web application project in the Google App Engine
Initiation the Java web application project in the Google App EngineInitiation the Java web application project in the Google App Engine
Initiation the Java web application project in the Google App Engine
 
Introduction to spring boot
Introduction to spring bootIntroduction to spring boot
Introduction to spring boot
 
dokumen.tips_introduction-to-spring-boot-58bb649a21ce5.pptx
dokumen.tips_introduction-to-spring-boot-58bb649a21ce5.pptxdokumen.tips_introduction-to-spring-boot-58bb649a21ce5.pptx
dokumen.tips_introduction-to-spring-boot-58bb649a21ce5.pptx
 
Spring hibernate tutorial
Spring hibernate tutorialSpring hibernate tutorial
Spring hibernate tutorial
 
Maven Introduction
Maven IntroductionMaven Introduction
Maven Introduction
 
Django simplified : by weever mbakaya
Django simplified : by weever mbakayaDjango simplified : by weever mbakaya
Django simplified : by weever mbakaya
 
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-AppsSelenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
 
BLCN532 Lab 1Set up your development environmentV2.0.docx
BLCN532 Lab 1Set up your development environmentV2.0.docxBLCN532 Lab 1Set up your development environmentV2.0.docx
BLCN532 Lab 1Set up your development environmentV2.0.docx
 
Installing the java sdk
Installing the java sdkInstalling the java sdk
Installing the java sdk
 
Opensource gis development - part 1
Opensource gis development - part 1Opensource gis development - part 1
Opensource gis development - part 1
 
Maven: Managing Software Projects for Repeatable Results
Maven: Managing Software Projects for Repeatable ResultsMaven: Managing Software Projects for Repeatable Results
Maven: Managing Software Projects for Repeatable Results
 
How to use_cucumber_rest-assured_api_framework
How to use_cucumber_rest-assured_api_frameworkHow to use_cucumber_rest-assured_api_framework
How to use_cucumber_rest-assured_api_framework
 
SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...
SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...
SenchaCon 2016: Building Enterprise Ext JS Apps with Mavenized Sencha Cmd - F...
 
Testing Java Web Apps With Selenium
Testing Java Web Apps With SeleniumTesting Java Web Apps With Selenium
Testing Java Web Apps With Selenium
 
Exploring Maven SVN GIT
Exploring Maven SVN GITExploring Maven SVN GIT
Exploring Maven SVN GIT
 
Spring Live Sample Chapter
Spring Live Sample ChapterSpring Live Sample Chapter
Spring Live Sample Chapter
 
Building a Spring Boot Application - Ask the Audience!
Building a Spring Boot Application - Ask the Audience!Building a Spring Boot Application - Ask the Audience!
Building a Spring Boot Application - Ask the Audience!
 
Flask
FlaskFlask
Flask
 
What's new in p2 (2009)?
What's new in p2 (2009)?What's new in p2 (2009)?
What's new in p2 (2009)?
 
Google app engine
Google app engineGoogle app engine
Google app engine
 

More from University of Economics in Katowice

More from University of Economics in Katowice (20)

python_function.pdf
python_function.pdfpython_function.pdf
python_function.pdf
 
python_p4_v2.pdf
python_p4_v2.pdfpython_p4_v2.pdf
python_p4_v2.pdf
 
python_p3.pdf
python_p3.pdfpython_p3.pdf
python_p3.pdf
 
python_p2v2_publikacja.pdf
python_p2v2_publikacja.pdfpython_p2v2_publikacja.pdf
python_p2v2_publikacja.pdf
 
python_p1.pdf
python_p1.pdfpython_p1.pdf
python_p1.pdf
 
TechnologyStack_basicsv2.pdf
TechnologyStack_basicsv2.pdfTechnologyStack_basicsv2.pdf
TechnologyStack_basicsv2.pdf
 
barplotv4.pdf
barplotv4.pdfbarplotv4.pdf
barplotv4.pdf
 
ie.pdf
ie.pdfie.pdf
ie.pdf
 
puś.ppt
puś.pptpuś.ppt
puś.ppt
 
EARv3.pdf
EARv3.pdfEARv3.pdf
EARv3.pdf
 
Projektowanie i implementacja usług sieciowych
Projektowanie i implementacja usług sieciowychProjektowanie i implementacja usług sieciowych
Projektowanie i implementacja usług sieciowych
 
Angular10302021
Angular10302021Angular10302021
Angular10302021
 
Środowisko PWA
Środowisko PWAŚrodowisko PWA
Środowisko PWA
 
Kolo REST
Kolo RESTKolo REST
Kolo REST
 
Inicjacja wg OpenUP
Inicjacja wg OpenUPInicjacja wg OpenUP
Inicjacja wg OpenUP
 
Dyscyplina zarządzania projektami wg OpenUP
Dyscyplina zarządzania projektami wg OpenUPDyscyplina zarządzania projektami wg OpenUP
Dyscyplina zarządzania projektami wg OpenUP
 
Atrybut zgodności
Atrybut zgodnościAtrybut zgodności
Atrybut zgodności
 
Wstęp do dyscypliny wymagań w projektach IT
Wstęp do dyscypliny wymagań w projektach ITWstęp do dyscypliny wymagań w projektach IT
Wstęp do dyscypliny wymagań w projektach IT
 
Projektowanie systemowinformatycznychprezentacjabazowa
Projektowanie systemowinformatycznychprezentacjabazowaProjektowanie systemowinformatycznychprezentacjabazowa
Projektowanie systemowinformatycznychprezentacjabazowa
 
Inżynieria oprogramowania - prezentacja bazowa
Inżynieria oprogramowania - prezentacja bazowaInżynieria oprogramowania - prezentacja bazowa
Inżynieria oprogramowania - prezentacja bazowa
 

Recently uploaded

Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesFatimaKhan178732
 

Recently uploaded (20)

TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Separation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and ActinidesSeparation of Lanthanides/ Lanthanides and Actinides
Separation of Lanthanides/ Lanthanides and Actinides
 

InitiateAEv2.pdf

  • 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 5. Additionally - Continued work in STS4
  • 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
  • 13. Continue work in STS4 (step 1) 1. Download and install STS 4 https://spring.io/tools 2. Import your first project (file>import>Maven>Existing Projects)
  • 14. Continue work in STS4 (step 2) 1. Make any changes, e.g. the text „Hello world! STS4” (it was in SpringbootApplication.java class) 2. Check on your local server to see if it works • Run „Spring Boot App” (from menu STS4) • Check website (by default it is an adress http://localhost:8080/)
  • 15. Continue work in STS4 (step 3) 1. In google CLI deploy your service (but if you have been logged out in the meantime, you will have to log in and set up the project). • gcloud auth login • gcloud config set project … • gcloud app deploy (make sure you are in the project directory where the pom.xml file is located) 2. Check you project address • gcloud app browse
  • 16. Source • Java 11/17 runtime environment https://cloud.google.com/appengine/docs/standard/java-gen2/runtime • and others mentioned in the presentation
  • 17. Thank you for your attention! Please submit any comments on the software-engineers.org PhD Artur Machura arturmachura.info