workshop guide: restful java web application with spring boot
TRANSCRIPT
Java Development
RESTful API with SPRING BOOT
01 Spring Boot
Goals
Fast quick start experience
• Provide a radically faster and widely accessible getting started experience for all Spring development.
Reference: [1] http://docs.spring.io/spring-boot/docs/1.2.2.BUILD-SNAPSHOT/reference/htmlsingle/#boot-documentation
01
Convention Over Configuration
• Be opinionated out of the box, but get out of the way quickly as requirements start to diverge from the defaults.
Reference: [1] http://docs.spring.io/spring-boot/docs/1.2.2.BUILD-SNAPSHOT/reference/htmlsingle/#boot-documentation
01
Non-functional features
• Provide a range of non-functional features that are common to large classes of projects (e.g. embedded servers, security, metrics, health checks, externalized configuration).
Reference: [1] http://docs.spring.io/spring-boot/docs/1.2.2.BUILD-SNAPSHOT/reference/htmlsingle/#boot-documentation
01
No required XML configuration
• Absolutely no code generation and no requirement for XML configuration.
Reference: [1] http://docs.spring.io/spring-boot/docs/1.2.2.BUILD-SNAPSHOT/reference/htmlsingle/#boot-documentation
01
Highlights
01 Spring Boot
Stand-alone Java Apps
Reference: [1] http://projects.spring.io/spring-boot/
02
Easy build tooling
Reference: [1] http://projects.spring.io/spring-boot/
• Provide opinionated 'starter' POMs to simplify your Maven and Gradle configurations
02
Default Embedded Servers
Reference: [1] http://projects.spring.io/spring-boot/
• Embed Tomcat • Jetty • Undertow directly • …no need to deploy WAR files
02
Production ready-features
Reference: [1] http://projects.spring.io/spring-boot/
Externalized configuration with runtime override
Metrics and Health Check
02
IDE Integration vs All-in-One Distribution
Reference: [1] http://projects.spring.io/spring-boot/
02
• Eclipse IDE • Spring Tool Suite (STS) : All-in-One
03 Hands-On
45min Workshop
Agenda1.Setup: Java 6+ (recommended 7 or 8) 2.Create Java Web App 3.Create RESTFul Controller
1.GET 2.POST
4.Testing: IntegrationTest, WebApiTest 5.Validating input data 6.Saving Data
• Create a Transactional Service Component • Define Entity Domain Model • Create a Repository
7.Database Initialization
03
See more…
• Using Hypermedia in REST APIs with Spring
HATEOAS
• Securing REST APIs
• Hexagonal Architecture for Java Applications
! fabricioepa.wordpress.com
Contact
FABRICIO EPAMINONDAS " linkedin.com/in/fabricioepa
! fabricioepa.wordpress.com
# @fabricioepa