Download as pdf or txt
Download as pdf or txt
You are on page 1of 18

© 2013 KMS Technology

DEVELOPING APPLICATION
WITH SPRING BOOT
TRUNG NGUYEN
TECHCON 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
Full source code:
https://github.com/kms-technology/springboot-angularjs-demo

DEVELOPING APPLICATION WITH SPRING BOOT


DEMO: START A PROJECT
POM Configuration

Standard-alone Application

DEVELOPING APPLICATION WITH SPRING BOOT


DEMO: DEVELOP THE BUSINESS
Domain Service

Unit-test for Service

DEVELOPING APPLICATION WITH SPRING BOOT


DEMO: PERSIST DATA
JPA Entity

POM Configuration

Spring Data JPA Repository

DEVELOPING APPLICATION WITH SPRING BOOT


DEMO: MAKE A REST SERVICE
POM Configuration

REST Controller

DEVELOPING APPLICATION WITH SPRING BOOT


DEMO: VALIDATE THE INPUTS
POM Configuration

JPA Entity Validation

REST Controller

DEVELOPING APPLICATION WITH SPRING BOOT


DEMO: VIEW BY ANGULARJS
AngularJS Structure
AngularJS Controller

AngularJS View
DEMO: UPLOAD A PHOTO
POM Configuration App Configuration

REST Controller

AngularJS Controller
DEMO: MORE SECURE
POM Configuration App Configuration

Security Configuration

AngularJS Controller
DEMO: PRODUCTION-READY
App Configuration

Trace
Health
Remoting

Gauge & Counter


DEMO: DEPLOY THE APPLICATION
‘Fat’ JAR file Deployment

WAR file Deployment


DEMO: GO LIVE

DEVELOPING APPLICATION WITH SPRING BOOT


REFERENCES

• http://projects.spring.io/spring-boot/
• http://spring.io/guides/gs/spring-boot/
• http://docs.spring.io/spring-
boot/docs/1.0.2.RELEASE/reference/htmlsingle/
• http://www.infoq.com/articles/microframeworks
1-spring-boot
• Source code:
https://github.com/kms-technology/springboot-angularjs-demo

DEVELOPING APPLICATION WITH SPRING BOOT


Questions

DEVELOPING APPLICATION WITH SPRING BOOT


THANK YOU

© 2013 KMS Technology

You might also like