18
© 2013 KMS Technology

Developing an application with Spring Boot

Embed Size (px)

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."

Citation preview

Page 1: Developing an application with Spring Boot

© 2013 KMS Technology

Page 2: Developing an application with Spring Boot

DEVELOPING APPLICATIONWITH SPRING BOOT

TRUNG NGUYENTECHCON 2014

KMS TECHNOLOGY VIETNAM

Page 3: Developing an application with Spring Boot

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

Page 4: Developing an application with Spring Boot

DEMO

DEVELOPING APPLICATION WITH SPRING BOOT

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

Page 5: Developing an application with Spring Boot

DEMO: START A PROJECT

POM Configuration

Standard-alone Application

DEVELOPING APPLICATION WITH SPRING BOOT

Page 6: Developing an application with Spring Boot

DEMO: DEVELOP THE BUSINESSDomain Service

Unit-test for Service

DEVELOPING APPLICATION WITH SPRING BOOT

Page 7: Developing an application with Spring Boot

DEMO: PERSIST DATA

POM Configuration

JPA Entity

Spring Data JPA Repository

DEVELOPING APPLICATION WITH SPRING BOOT

Page 8: Developing an application with Spring Boot

DEMO: MAKE A REST SERVICEPOM Configuration

REST Controller

DEVELOPING APPLICATION WITH SPRING BOOT

Page 9: Developing an application with Spring Boot

DEMO: VALIDATE THE INPUTS

DEVELOPING APPLICATION WITH SPRING BOOT

POM Configuration

JPA Entity Validation

REST Controller

Page 10: Developing an application with Spring Boot

DEMO: VIEW BY ANGULARJSAngularJS Structure

AngularJS Controller

AngularJS View

Page 11: Developing an application with Spring Boot

DEMO: UPLOAD A PHOTOPOM Configuration

AngularJS Controller

REST Controller

App Configuration

Page 12: Developing an application with Spring Boot

DEMO: MORE SECUREPOM Configuration App Configuration

Security Configuration

AngularJS Controller

Page 13: Developing an application with Spring Boot

DEMO: PRODUCTION-READYAp

p Co

nfigu

ratio

n

Remoting

Gauge & Counter

Trac

eHealth

Page 14: Developing an application with Spring Boot

DEMO: DEPLOY THE APPLICATION‘Fat’ JAR file Deployment

WAR file Deployment

Page 15: Developing an application with Spring Boot

DEMO: GO LIVE

DEVELOPING APPLICATION WITH SPRING BOOT

Page 17: Developing an application with Spring Boot

Questions

DEVELOPING APPLICATION WITH SPRING BOOT

Page 18: Developing an application with Spring Boot

THANK YOU

© 2013 KMS Technology