22
@kaviddiss | www.kaviddiss.com David Kiss Create Your Very First Spring Application Building Web Applications Using Java and Spring Framework (Module 1)

Building web applications with Java & Spring

Embed Size (px)

Citation preview

Page 1: Building web applications with Java & Spring

@kaviddiss | www.kaviddiss.com

David Kiss

Create Your Very First Spring Application

Building Web Applications Using Java and Spring Framework (Module 1)

Page 2: Building web applications with Java & Spring

What to Expect

  A practical guide to get up and running quickly on

creating Spring-based web application from scratch

  Using latest versions of Java, Spring Framework (4.x),

Spring Boot (v1.2.x), Spring Security, Spring Data JPA,

Thymeleaf and Maven 3 frameworks

Page 3: Building web applications with Java & Spring

What Not to Expect

  XML configurations

  Outdated versions of Java frameworks

  Textbook walk-through of all the Spring components

on Earth

Page 4: Building web applications with Java & Spring

Why Using Spring Framework

  Spring is a mature yet still innovative open-source

framework

  Spring has a very active community

Spring is light-weight - can run without a JEE server

Spring makes you productive - no requirement for XML

configuration

Page 5: Building web applications with Java & Spring

etc.CachingMessaging

SQL and NoSQL databases

SecurityMVC

Spring Gets You Covered With...

Page 6: Building web applications with Java & Spring

Companies Using Spring Framework

Page 7: Building web applications with Java & Spring

Our First Web Application

Time to Create Some Code

Page 8: Building web applications with Java & Spring

Demo

Now we’re going to create a URL shortener web application...

Page 9: Building web applications with Java & Spring

Generate the Project at http://start.spring.io

Page 10: Building web applications with Java & Spring

And Implementing the Web Application...

After Generating the Project

Page 11: Building web applications with Java & Spring

Here’s The Final List of Files

Page 12: Building web applications with Java & Spring

and Walk Through the Code

Now Let’s See the Details

Page 13: Building web applications with Java & Spring

Starting a Web Application Cannot Be Easier

Page 14: Building web applications with Java & Spring

Mapping URLs to Java Methods #1

Page 15: Building web applications with Java & Spring

shortener.html - Using Thymeleaf Template Engine

Page 16: Building web applications with Java & Spring

Mapping URLs to Java Methods #2

Page 17: Building web applications with Java & Spring

Our HTTP Request Object

Page 18: Building web applications with Java & Spring

A Minimalist In-Memory Persistence Layer

Page 19: Building web applications with Java & Spring

$ mvn spring-boot:run

Let’s See It In Action

Page 20: Building web applications with Java & Spring

Starting Up...

Page 21: Building web applications with Java & Spring

Ta-Da!!!

Page 22: Building web applications with Java & Spring

Java and Spring CAN be productive!

Source code available at https://github.com/davidkiss/yourl

Any questions / suggestions:

[email protected]

Overview