Developing an application with Spring Boot

Post on 27-Aug-2014

547 views 2 download

description

My presentation slides in KMS TechCon 2014, an internal technology event at KMS Technology Vietnam company. The source code: https://github.com/kms-technology/springboot-angularjs-demo "Spring Boot is a brand new framework from Spring Source, designed to simplify the bootstrapping and development of a new Spring application. Let's explore it through developing a web application using modern web technologies such as Spring 4, Spring Security, Spring Data JPA, AngularJS and Bootstrap UI."

transcript

© 2013 KMS Technology

DEVELOPING APPLICATIONWITH SPRING BOOT

TRUNG NGUYENTECHCON 2014

KMS TECHNOLOGY VIETNAM

INTRODUCTION TO SPRING BOOT

• Create stand-alone Spring applications– Embed Tomcat or Jetty directly

• Provide opinionated 'starter' POMs– simplify your Maven configuration

• Automatically configure Spring whenever possible• Provide production-ready features– metrics, health checks and externalized configuration

No code generation and no requirement for XML configuration

DEMO

DEVELOPING APPLICATION WITH SPRING BOOT

Full source code:https://github.com/kms-technology/springboot-angularjs-demo

DEMO: START A PROJECT

POM Configuration

Standard-alone Application

DEVELOPING APPLICATION WITH SPRING BOOT

DEMO: DEVELOP THE BUSINESSDomain Service

Unit-test for Service

DEVELOPING APPLICATION WITH SPRING BOOT

DEMO: PERSIST DATA

POM Configuration

JPA Entity

Spring Data JPA Repository

DEVELOPING APPLICATION WITH SPRING BOOT

DEMO: MAKE A REST SERVICEPOM Configuration

REST Controller

DEVELOPING APPLICATION WITH SPRING BOOT

DEMO: VALIDATE THE INPUTS

DEVELOPING APPLICATION WITH SPRING BOOT

POM Configuration

JPA Entity Validation

REST Controller

DEMO: VIEW BY ANGULARJSAngularJS Structure

AngularJS Controller

AngularJS View

DEMO: UPLOAD A PHOTOPOM Configuration

AngularJS Controller

REST Controller

App Configuration

DEMO: MORE SECUREPOM Configuration App Configuration

Security Configuration

AngularJS Controller

DEMO: PRODUCTION-READYAp

p Co

nfigu

ratio

n

Remoting

Gauge & Counter

Trac

eHealth

DEMO: DEPLOY THE APPLICATION‘Fat’ JAR file Deployment

WAR file Deployment

DEMO: GO LIVE

DEVELOPING APPLICATION WITH SPRING BOOT

Questions

DEVELOPING APPLICATION WITH SPRING BOOT

THANK YOU

© 2013 KMS Technology