SlideShare a Scribd company logo
1 of 29
Download to read offline
Trilha Java EE
Emmanuel Neri
CONSTRUINDO APIS DE FORMA PRODUTIVA
COM SPRING BOOT, SPRING DATA E
SPRING MVC
EMMANUEL NERI
‣ Mestre em Desenvolvimento de Tecnologia
‣ Desenvolvedor desde 2010
‣ Atualmente desenvolvedor back-end na Navita
)(
PROBLEMA
Quais os obstáculos da construção de APIs?
Ambiente Objeto <—> JSON Acessos aos dados
AGENDA
Spring Boot
Spring MVC Spring Data
SPRING BOOT
Spring Boot
AUTO
CONFIGURAÇÃO
EMBEDDED
SERVLET
CONTAINERS
GERENCIAMENTO
DE DEPENDÊNCIAS
GERENCIAMENTO DE DEPENDÊNCIAS
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<version>1.5.3.RELEASE</version>
</dependency>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>1.5.3.RELEASE</version>
</plugin>
</plugins>
</build>
GERENCIAMENTO DE DEPENDÊNCIAS
AUTO CONFIGURAÇÃO
@SpringBootApplication
public class AppConfig {
public static void main(String[] args) {
SpringApplication.run(AppConfig.class, args);
}
}
@EnableAutoConfiguration
@AutoConfigureTestDatabase
@AutoConfigureMockMvc
AUTO CONFIGURAÇÃO
=========================
AUTO-CONFIGURATION REPORT
=========================
Positive matches:
-----------------
EmbeddedServletContainerAutoConfiguration matched:
...
DataSourceConfiguration.Tomcat matched:
...
Negative matches:
-----------------
ActiveMQAutoConfiguration:
Did not match:
RedisAutoConfiguration:
Did not match:
mvn spring-boot:run -Ddebug
AUTO CONFIGURAÇÃO
/src/main/resources/application.properties
spring.profiles.active=dev
server.port=8090
server.context-path=/api
spring.http.encoding.charset=UTF-8
spring.datasource.url=jdbc:postgresql://localhost:5432/db
spring.datasource.username=postgres
spring.datasource.password=postgres
spring.datasource.driver-class-name=org.postgresql.Driver
spring.jpa.show-sql=true
AUTO CONFIGURAÇÃO
spring.profiles.active=
spring.mail.host=
spring.sendgrid.api-key=
flyway.enabled=true # Enable flyway
liquibase.enabled=true
spring.data.cassandra.cluster-name=
spring.data.elasticsearch.cluster-name=
spring.data.mongodb.database=test
spring.data.redis.repositories.enabled=true
spring.activemq.broker-url=
….
https://docs.spring.io/spring-boot/docs/current/reference/html/common-application-properties.html
EMBEDDED SERVLET CONTAINERS
mvn spring-boot:run
s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
SPRING MVC
Spring MVC
FACILIDADE NA
LEITURA DE
PARÂMETROS
ABSTRAÇÃO NA
SERIALIZAÇÃO /
DESERIALIZAÇÃO
SIMPLICIDADE NA
EXPOSIÇÃO DE APIS
CONSTRUÇÃO
SIMPLES
ESTRUTURA DE
RETORNO
TRATAMENTO DE
ERROS
SIMPLICIDADE NA EXPOSIÇÃO DE APIS
@RestController
@RequestMapping("/customers")
public class CustomerController {
@RequestMapping(method = RequestMethod.GET)
public List<Customer> findAll() {
return customerService.findAll();
}
}
http://localhost:8080/customers
ABSTRAÇÃO NA SERIALIZAÇÃO / DESERIALIZAÇÃO
@RequestMapping(method = RequestMethod.GET)
public List<Customer> findAll() {
return customerService.findAll();
}
@RequestMapping(method = RequestMethod.POST)
public void save(@RequestBody BillDTO billDTO) {
billService.save(billDTO);
}
ABSTRAÇÃO NA SERIALIZAÇÃO / DESERIALIZAÇÃO
import com.fasterxml.jackson.annotation.JsonFormat;
public final class BillDTO {
@JsonFormat(pattern = "yyyy-MM")
private YearMonth yearMonth;
FACILIDADE NA LEITURA DE PARÂMETROS
@RequestMapping(value = "/byUk/{customerId}/{identifier}/{yearMonth}",
method = RequestMethod.GET)
public Bill findByUk(@PathVariable("customerId") Long customerId,
@PathVariable("identifier") String identifier,
@PathVariable("yearMonth") YearMonth yearMonth) {
return billService.findByUk(customerId, identifier, yearMonth);
}
@RequestMapping(value = "/search", method = RequestMethod.GET)
public List<Customer> search(
@RequestParam(value = "id", required = false) Long id,
@RequestParam(value = "name", required = false) String name){
return customerService.search(new CustomerSearchTO(id, name));
}
CONSTRUÇÃO SIMPLES ESTRUTURA DE RETORNO
ResponseEntity.ok(bill);
ResponseEntity.badRequest().build();
@RequestMapping(method = RequestMethod.GET)
public ResponseEntity ok() {
return ResponseEntity.ok().build();
}
200
400
200
{  
   "id":1,
   "customer":{  
      "name":"Customer"
   },
   "carrier":{  
      "name":"TIM"
   },
   "identifier":"23326",
   “yearMonth”:"2017/06" 
}
ResponseEntity.status(UNAUTHORIZED).build(); 401
TRATAMENTO DE ERROS
@ControllerAdvice
public class GlobalExceptionHandler {
@ExceptionHandler(BusinessException.class)
public ResponseEntity<Set<ExceptionTO>> handleError(BusinessException ex) {
return ResponseEntity.status(HttpStatus.BAD_REQUEST)
.body(Collections.singleton(new ExceptionTO(ex.getMessage())));
}
@ExceptionHandler(ConstraintViolationException.class)
public ResponseEntity<Set<ExceptionTO>> handleError(ConstraintViolationException
ex) {
final Set<ExceptionTO> erros = ex.getConstraintViolations().stream()
.map(c -> new ExceptionTO(c.getMessage()))
.collect(Collectors.toSet());
return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(erros);
}
@ExceptionHandler(Exception.class)
public ResponseEntity handleError(Exception ex) {
return ResponseEntity.status(HttpStatus.INTERNAL_SERVER_ERROR)
.body("O sistema se encontra indisponível”);
}
SPRING DATA
Spring Data
SUPORTE A
DIFERENTE
FONTES DE
DADOS
ABSTRAÇÃO NO
ACESSO AOS
DADOS
IMPLEMENTAÇÕES
PADRÕES
CACHE
IMPLEMENTAÇÕES PADRÕES
public interface BillRepository extends JpaRepository<Bill, Long> {
‣ findAll()
‣ save(T object)
‣ save(Iterable<T> objects)
‣ flush()
‣ getOne(ID id)
‣ delete(ID id)
‣ deleteInBatch(Iterable<T> objects)
ABSTRAÇÃO NO ACESSO AOS DADOS
public Customer save(Customer customer) {
return customerRepository.save(customer);
}
public List<Customer> findAll() {
return customerRepository.findAll();
}
public Page<Customer> findPaginable(int page, int size) {
final Sort sort = new Sort(Sort.Direction.DESC, "name");
return customerRepository.findAll(
new PageRequest(page, size, sort));
}
ABSTRAÇÃO NO ACESSO AOS DADOS
Bill findByCustomerIdAndIdentifierAndYearMonth(Long customerId,
String identifier, YearMonth yearMonth);
@Modifying
@Query("delete from BillItem where bill.id = :#{#billId}")
void deleteByBillItem(@Param("billId") Long billId);
Hibernate: select bill… from bill bill0_ where bill0_.customer_id=? and
bill0_.identifier=? and bill0_.year_month=?
Hibernate: delete from bill where id=?
ABSTRAÇÃO NO ACESSO AOS DADOS
‣ Integração com QueryDSL
public interface BillRepository extends JpaRepository<Bill, Long>,
QueryDslPredicateExecutor<Bill> {
public Page<Bill> search(BillSearchTO searchTO) {
return billRepository.findAll(searchTO.toPredicate(),
new PageRequest(searchTO.getPage(), searchTO.getSize(),
new Sort(Sort.Direction.DESC, "id")));
}
public class BillSearchTO {
public BooleanBuilder toPredicate() {
final QBill qBill = QBill.bill;
final BooleanBuilder predicate = new BooleanBuilder();
if(!Strings.isNullOrEmpty(identifier)) {
predicate.and(qBill.identifier.eq(identifier));
}
if(initYearMonth != null) {
predicate.and(qBill.yearMonth.goe(initYearMonth));
}
ACESSO AOS DADOS
‣ Repositorios customizados
public interface BillRepositoryCustom {
Page<BillDTO> findAll(BillSearchTO searchTO);
}
public interface BillRepository extends JpaRepository<Bill, Long>,
QueryDslPredicateExecutor<Bill>, BillRepositoryCustom {
...
public class BillRepositoryImpl implements BillRepositoryCustom {
@PersistenceContext
private EntityManager entityManager;
@Override
public Page<BillDTO> findAll(BillSearchTO searchTO) {
final JPQLQuery jpaQuery = new JPAQuery(entityManager)
.from(qBill)
.join(qBill.carrier).fetchJoin()
.join(qBill.customer).fetchJoin()
.join(qBill.items).fetchJoin();
...
SUPORTE A DIFERENTE FONTES DE DADOS
‣ Módulos da Spring
‣ Módulos da comunidade
JPA LDAP
REST
SUPORTE A DIFERENTE FONTES DE DADOS
public interface BillFileRepository extends MongoRepository<BillFile, String> {
}
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
@Document(collection = "bill_file")
@Getter
public class BillFile {
@Id
private String id;
private String date;
private String content
CACHE
@SpringBootApplication
@EnableCaching
public class AppConfig {
@Cacheable("carriers")
public List<Carrier> findAll() {
return carrierRepository.findAll();
}
‣ JSR-107
‣ Caffeine
‣ Guava cache
‣ EhCache
‣ GemFire
FIM …
OBRIGADO!
https://github.com/emmanuelneri/productivity-with-spring
emmanuelnerisouza@gmail.com
https://github.com/emmanuelneri
@emmanuelnerii
www.emmanuelneri.com.br

More Related Content

What's hot

Extbase and Beyond
Extbase and BeyondExtbase and Beyond
Extbase and BeyondJochen Rau
 
Melhorando sua API com DSLs
Melhorando sua API com DSLsMelhorando sua API com DSLs
Melhorando sua API com DSLsAugusto Pascutti
 
Laporan multiclient chatting client server
Laporan multiclient chatting client serverLaporan multiclient chatting client server
Laporan multiclient chatting client servertrilestari08
 
HelsinkiJS meet-up. Dmitry Soshnikov - ECMAScript 6
HelsinkiJS meet-up. Dmitry Soshnikov - ECMAScript 6HelsinkiJS meet-up. Dmitry Soshnikov - ECMAScript 6
HelsinkiJS meet-up. Dmitry Soshnikov - ECMAScript 6Dmitry Soshnikov
 
C++ prgms 4th unit Inheritance
C++ prgms 4th unit InheritanceC++ prgms 4th unit Inheritance
C++ prgms 4th unit InheritanceAnanda Kumar HN
 
C++ prgms 5th unit (inheritance ii)
C++ prgms 5th unit (inheritance ii)C++ prgms 5th unit (inheritance ii)
C++ prgms 5th unit (inheritance ii)Ananda Kumar HN
 
Adding Dependency Injection to Legacy Applications
Adding Dependency Injection to Legacy ApplicationsAdding Dependency Injection to Legacy Applications
Adding Dependency Injection to Legacy ApplicationsSam Hennessy
 
Programa simulacion de ventas de aeropuerto
Programa simulacion de ventas de aeropuertoPrograma simulacion de ventas de aeropuerto
Programa simulacion de ventas de aeropuertoAnel Sosa
 
Cycle.js: Functional and Reactive
Cycle.js: Functional and ReactiveCycle.js: Functional and Reactive
Cycle.js: Functional and ReactiveEugene Zharkov
 
Javascript: the important bits
Javascript: the important bitsJavascript: the important bits
Javascript: the important bitsChris Saylor
 
Androidの音声認識とテキスト読み上げ機能について
Androidの音声認識とテキスト読み上げ機能についてAndroidの音声認識とテキスト読み上げ機能について
Androidの音声認識とテキスト読み上げ機能についてmoai kids
 
Vaadin today and tomorrow
Vaadin today and tomorrowVaadin today and tomorrow
Vaadin today and tomorrowJoonas Lehtinen
 
Wwe Management System
Wwe Management SystemWwe Management System
Wwe Management SystemNeerajMudgal1
 
Migrating to dependency injection
Migrating to dependency injectionMigrating to dependency injection
Migrating to dependency injectionJosh Adell
 

What's hot (20)

Extbase and Beyond
Extbase and BeyondExtbase and Beyond
Extbase and Beyond
 
Melhorando sua API com DSLs
Melhorando sua API com DSLsMelhorando sua API com DSLs
Melhorando sua API com DSLs
 
Laporan multiclient chatting client server
Laporan multiclient chatting client serverLaporan multiclient chatting client server
Laporan multiclient chatting client server
 
HelsinkiJS meet-up. Dmitry Soshnikov - ECMAScript 6
HelsinkiJS meet-up. Dmitry Soshnikov - ECMAScript 6HelsinkiJS meet-up. Dmitry Soshnikov - ECMAScript 6
HelsinkiJS meet-up. Dmitry Soshnikov - ECMAScript 6
 
C++ prgms 4th unit Inheritance
C++ prgms 4th unit InheritanceC++ prgms 4th unit Inheritance
C++ prgms 4th unit Inheritance
 
Introduzione a C#
Introduzione a C#Introduzione a C#
Introduzione a C#
 
C++ prgms 5th unit (inheritance ii)
C++ prgms 5th unit (inheritance ii)C++ prgms 5th unit (inheritance ii)
C++ prgms 5th unit (inheritance ii)
 
Adding Dependency Injection to Legacy Applications
Adding Dependency Injection to Legacy ApplicationsAdding Dependency Injection to Legacy Applications
Adding Dependency Injection to Legacy Applications
 
Ip project
Ip projectIp project
Ip project
 
Elm: give it a try
Elm: give it a tryElm: give it a try
Elm: give it a try
 
Mattbrenner
MattbrennerMattbrenner
Mattbrenner
 
Unittests für Dummies
Unittests für DummiesUnittests für Dummies
Unittests für Dummies
 
Programa simulacion de ventas de aeropuerto
Programa simulacion de ventas de aeropuertoPrograma simulacion de ventas de aeropuerto
Programa simulacion de ventas de aeropuerto
 
Cycle.js: Functional and Reactive
Cycle.js: Functional and ReactiveCycle.js: Functional and Reactive
Cycle.js: Functional and Reactive
 
Javascript: the important bits
Javascript: the important bitsJavascript: the important bits
Javascript: the important bits
 
Androidの音声認識とテキスト読み上げ機能について
Androidの音声認識とテキスト読み上げ機能についてAndroidの音声認識とテキスト読み上げ機能について
Androidの音声認識とテキスト読み上げ機能について
 
Vaadin today and tomorrow
Vaadin today and tomorrowVaadin today and tomorrow
Vaadin today and tomorrow
 
Wwe Management System
Wwe Management SystemWwe Management System
Wwe Management System
 
Migrating to dependency injection
Migrating to dependency injectionMigrating to dependency injection
Migrating to dependency injection
 
Introduccion a Jasmin
Introduccion a JasminIntroduccion a Jasmin
Introduccion a Jasmin
 

Viewers also liked

O Impacto da arquitetura de Micro Serviços nas soluções de software
O Impacto da arquitetura de Micro Serviços nas soluções de softwareO Impacto da arquitetura de Micro Serviços nas soluções de software
O Impacto da arquitetura de Micro Serviços nas soluções de softwareEmmanuel Neri
 
Criando uma arquitetura escalável para processamento de arquivos com micro s...
Criando uma arquitetura escalável para processamento de arquivos com micro s...Criando uma arquitetura escalável para processamento de arquivos com micro s...
Criando uma arquitetura escalável para processamento de arquivos com micro s...Emmanuel Neri
 
Microservices: Mais que uma arquitetura de software, uma filosofia de desenvo...
Microservices: Mais que uma arquitetura de software, uma filosofia de desenvo...Microservices: Mais que uma arquitetura de software, uma filosofia de desenvo...
Microservices: Mais que uma arquitetura de software, uma filosofia de desenvo...Emmanuel Neri
 
A Cultura do Home Office
A Cultura do Home OfficeA Cultura do Home Office
A Cultura do Home OfficeEmmanuel Neri
 
O comparativo de arquiteturas de software monolíticas em relação a arquitetur...
O comparativo de arquiteturas de software monolíticas em relação a arquitetur...O comparativo de arquiteturas de software monolíticas em relação a arquitetur...
O comparativo de arquiteturas de software monolíticas em relação a arquitetur...Emmanuel Neri
 
Jett: Exporte Excel do jeito que seu cliente sempre sonhou
Jett: Exporte Excel do jeito que seu cliente sempre sonhouJett: Exporte Excel do jeito que seu cliente sempre sonhou
Jett: Exporte Excel do jeito que seu cliente sempre sonhouEmmanuel Neri
 
Combatendo code smells em aplicações Java
Combatendo code smells em aplicações JavaCombatendo code smells em aplicações Java
Combatendo code smells em aplicações JavaEmmanuel Neri
 
Desenvolvimento baseado em componentes com JSF
Desenvolvimento baseado em componentes com JSFDesenvolvimento baseado em componentes com JSF
Desenvolvimento baseado em componentes com JSFEmmanuel Neri
 
A trilogia Spring MVC + Spring Data + AngularJS
A trilogia  Spring MVC + Spring Data + AngularJSA trilogia  Spring MVC + Spring Data + AngularJS
A trilogia Spring MVC + Spring Data + AngularJSEmmanuel Neri
 

Viewers also liked (9)

O Impacto da arquitetura de Micro Serviços nas soluções de software
O Impacto da arquitetura de Micro Serviços nas soluções de softwareO Impacto da arquitetura de Micro Serviços nas soluções de software
O Impacto da arquitetura de Micro Serviços nas soluções de software
 
Criando uma arquitetura escalável para processamento de arquivos com micro s...
Criando uma arquitetura escalável para processamento de arquivos com micro s...Criando uma arquitetura escalável para processamento de arquivos com micro s...
Criando uma arquitetura escalável para processamento de arquivos com micro s...
 
Microservices: Mais que uma arquitetura de software, uma filosofia de desenvo...
Microservices: Mais que uma arquitetura de software, uma filosofia de desenvo...Microservices: Mais que uma arquitetura de software, uma filosofia de desenvo...
Microservices: Mais que uma arquitetura de software, uma filosofia de desenvo...
 
A Cultura do Home Office
A Cultura do Home OfficeA Cultura do Home Office
A Cultura do Home Office
 
O comparativo de arquiteturas de software monolíticas em relação a arquitetur...
O comparativo de arquiteturas de software monolíticas em relação a arquitetur...O comparativo de arquiteturas de software monolíticas em relação a arquitetur...
O comparativo de arquiteturas de software monolíticas em relação a arquitetur...
 
Jett: Exporte Excel do jeito que seu cliente sempre sonhou
Jett: Exporte Excel do jeito que seu cliente sempre sonhouJett: Exporte Excel do jeito que seu cliente sempre sonhou
Jett: Exporte Excel do jeito que seu cliente sempre sonhou
 
Combatendo code smells em aplicações Java
Combatendo code smells em aplicações JavaCombatendo code smells em aplicações Java
Combatendo code smells em aplicações Java
 
Desenvolvimento baseado em componentes com JSF
Desenvolvimento baseado em componentes com JSFDesenvolvimento baseado em componentes com JSF
Desenvolvimento baseado em componentes com JSF
 
A trilogia Spring MVC + Spring Data + AngularJS
A trilogia  Spring MVC + Spring Data + AngularJSA trilogia  Spring MVC + Spring Data + AngularJS
A trilogia Spring MVC + Spring Data + AngularJS
 

Similar to Construindo APIs de forma produtiva com Spring Boot, Spring Data e Spring MVC

TDC2017 | São Paulo - Trilha Java EE How we figured out we had a SRE team at ...
TDC2017 | São Paulo - Trilha Java EE How we figured out we had a SRE team at ...TDC2017 | São Paulo - Trilha Java EE How we figured out we had a SRE team at ...
TDC2017 | São Paulo - Trilha Java EE How we figured out we had a SRE team at ...tdc-globalcode
 
Backbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVCBackbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVCpootsbook
 
Windows Azure and a little SQL Data Services
Windows Azure and a little SQL Data ServicesWindows Azure and a little SQL Data Services
Windows Azure and a little SQL Data Servicesukdpe
 
May 2010 - RestEasy
May 2010 - RestEasyMay 2010 - RestEasy
May 2010 - RestEasyJBug Italy
 
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)Red Hat Developers
 
Modular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSModular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSGunnar Hillert
 
Implementation of GUI Framework part3
Implementation of GUI Framework part3Implementation of GUI Framework part3
Implementation of GUI Framework part3masahiroookubo
 
Javascript first-class citizenery
Javascript first-class citizeneryJavascript first-class citizenery
Javascript first-class citizenerytoddbr
 
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...Dan Wahlin
 
Symfony2 - from the trenches
Symfony2 - from the trenchesSymfony2 - from the trenches
Symfony2 - from the trenchesLukas Smith
 
DWR, Hibernate and Dojo.E - A Tutorial
DWR, Hibernate and Dojo.E - A TutorialDWR, Hibernate and Dojo.E - A Tutorial
DWR, Hibernate and Dojo.E - A Tutorialjbarciauskas
 
Flask and Angular: An approach to build robust platforms
Flask and Angular:  An approach to build robust platformsFlask and Angular:  An approach to build robust platforms
Flask and Angular: An approach to build robust platformsAyush Sharma
 
Core Php Component Presentation
Core Php Component PresentationCore Php Component Presentation
Core Php Component PresentationJohn Coonen
 
Corephpcomponentpresentation 1211425966721657-8
Corephpcomponentpresentation 1211425966721657-8Corephpcomponentpresentation 1211425966721657-8
Corephpcomponentpresentation 1211425966721657-8PrinceGuru MS
 

Similar to Construindo APIs de forma produtiva com Spring Boot, Spring Data e Spring MVC (20)

TDC2017 | São Paulo - Trilha Java EE How we figured out we had a SRE team at ...
TDC2017 | São Paulo - Trilha Java EE How we figured out we had a SRE team at ...TDC2017 | São Paulo - Trilha Java EE How we figured out we had a SRE team at ...
TDC2017 | São Paulo - Trilha Java EE How we figured out we had a SRE team at ...
 
Backbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVCBackbone.js — Introduction to client-side JavaScript MVC
Backbone.js — Introduction to client-side JavaScript MVC
 
前端概述
前端概述前端概述
前端概述
 
Windows Azure and a little SQL Data Services
Windows Azure and a little SQL Data ServicesWindows Azure and a little SQL Data Services
Windows Azure and a little SQL Data Services
 
May 2010 - RestEasy
May 2010 - RestEasyMay 2010 - RestEasy
May 2010 - RestEasy
 
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
Boost Development With Java EE7 On EAP7 (Demitris Andreadis)
 
RESTEasy
RESTEasyRESTEasy
RESTEasy
 
Nativescript angular
Nativescript angularNativescript angular
Nativescript angular
 
Advanced redux
Advanced reduxAdvanced redux
Advanced redux
 
Modular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSModular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJS
 
Implementation of GUI Framework part3
Implementation of GUI Framework part3Implementation of GUI Framework part3
Implementation of GUI Framework part3
 
Javascript first-class citizenery
Javascript first-class citizeneryJavascript first-class citizenery
Javascript first-class citizenery
 
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
Building the an End-to-End ASP.NET MVC 4, Entity Framework, HTML5, jQuery app...
 
Symfony2 - from the trenches
Symfony2 - from the trenchesSymfony2 - from the trenches
Symfony2 - from the trenches
 
Html5 bug
Html5 bugHtml5 bug
Html5 bug
 
DWR, Hibernate and Dojo.E - A Tutorial
DWR, Hibernate and Dojo.E - A TutorialDWR, Hibernate and Dojo.E - A Tutorial
DWR, Hibernate and Dojo.E - A Tutorial
 
Dojo and Adobe AIR
Dojo and Adobe AIRDojo and Adobe AIR
Dojo and Adobe AIR
 
Flask and Angular: An approach to build robust platforms
Flask and Angular:  An approach to build robust platformsFlask and Angular:  An approach to build robust platforms
Flask and Angular: An approach to build robust platforms
 
Core Php Component Presentation
Core Php Component PresentationCore Php Component Presentation
Core Php Component Presentation
 
Corephpcomponentpresentation 1211425966721657-8
Corephpcomponentpresentation 1211425966721657-8Corephpcomponentpresentation 1211425966721657-8
Corephpcomponentpresentation 1211425966721657-8
 

More from Emmanuel Neri

Arquitetura orientada a eventos
Arquitetura orientada a eventosArquitetura orientada a eventos
Arquitetura orientada a eventosEmmanuel Neri
 
Iniciando com Docker
Iniciando com DockerIniciando com Docker
Iniciando com DockerEmmanuel Neri
 
Arquitetura reativa, a solução para os microserviços?
Arquitetura reativa,  a solução para os microserviços?Arquitetura reativa,  a solução para os microserviços?
Arquitetura reativa, a solução para os microserviços?Emmanuel Neri
 
Preparando nossas aplicações para falharem com feature toggle e configurações...
Preparando nossas aplicações para falharem com feature toggle e configurações...Preparando nossas aplicações para falharem com feature toggle e configurações...
Preparando nossas aplicações para falharem com feature toggle e configurações...Emmanuel Neri
 
Preparando nossa aplicação para falhar com feature toggle e configurações dis...
Preparando nossa aplicação para falhar com feature toggle e configurações dis...Preparando nossa aplicação para falhar com feature toggle e configurações dis...
Preparando nossa aplicação para falhar com feature toggle e configurações dis...Emmanuel Neri
 
Configurações distribuídas com Spring Cloud Config
Configurações distribuídas com Spring Cloud ConfigConfigurações distribuídas com Spring Cloud Config
Configurações distribuídas com Spring Cloud ConfigEmmanuel Neri
 
Lidando com desafios dos microserviços com a stack Spring Cloud Netflix
Lidando com desafios dos microserviços com a stack Spring Cloud NetflixLidando com desafios dos microserviços com a stack Spring Cloud Netflix
Lidando com desafios dos microserviços com a stack Spring Cloud NetflixEmmanuel Neri
 
Aplicação da arquitetura de micro serviços em softwares corporativos
Aplicação da arquitetura de micro serviços em softwares corporativosAplicação da arquitetura de micro serviços em softwares corporativos
Aplicação da arquitetura de micro serviços em softwares corporativosEmmanuel Neri
 
Análise e Design - RUP
Análise e Design - RUPAnálise e Design - RUP
Análise e Design - RUPEmmanuel Neri
 
Solução técnica - CMMI nível 3
Solução técnica - CMMI nível 3Solução técnica - CMMI nível 3
Solução técnica - CMMI nível 3Emmanuel Neri
 

More from Emmanuel Neri (12)

Arquitetura orientada a eventos
Arquitetura orientada a eventosArquitetura orientada a eventos
Arquitetura orientada a eventos
 
Iniciando com Docker
Iniciando com DockerIniciando com Docker
Iniciando com Docker
 
Arquitetura reativa, a solução para os microserviços?
Arquitetura reativa,  a solução para os microserviços?Arquitetura reativa,  a solução para os microserviços?
Arquitetura reativa, a solução para os microserviços?
 
Preparando nossas aplicações para falharem com feature toggle e configurações...
Preparando nossas aplicações para falharem com feature toggle e configurações...Preparando nossas aplicações para falharem com feature toggle e configurações...
Preparando nossas aplicações para falharem com feature toggle e configurações...
 
Preparando nossa aplicação para falhar com feature toggle e configurações dis...
Preparando nossa aplicação para falhar com feature toggle e configurações dis...Preparando nossa aplicação para falhar com feature toggle e configurações dis...
Preparando nossa aplicação para falhar com feature toggle e configurações dis...
 
Configurações distribuídas com Spring Cloud Config
Configurações distribuídas com Spring Cloud ConfigConfigurações distribuídas com Spring Cloud Config
Configurações distribuídas com Spring Cloud Config
 
Lidando com desafios dos microserviços com a stack Spring Cloud Netflix
Lidando com desafios dos microserviços com a stack Spring Cloud NetflixLidando com desafios dos microserviços com a stack Spring Cloud Netflix
Lidando com desafios dos microserviços com a stack Spring Cloud Netflix
 
Trabalho Remoto
Trabalho RemotoTrabalho Remoto
Trabalho Remoto
 
Aplicação da arquitetura de micro serviços em softwares corporativos
Aplicação da arquitetura de micro serviços em softwares corporativosAplicação da arquitetura de micro serviços em softwares corporativos
Aplicação da arquitetura de micro serviços em softwares corporativos
 
Análise e Design - RUP
Análise e Design - RUPAnálise e Design - RUP
Análise e Design - RUP
 
Solução técnica - CMMI nível 3
Solução técnica - CMMI nível 3Solução técnica - CMMI nível 3
Solução técnica - CMMI nível 3
 
Jenkins
JenkinsJenkins
Jenkins
 

Recently uploaded

Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 

Recently uploaded (20)

Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 

Construindo APIs de forma produtiva com Spring Boot, Spring Data e Spring MVC

Editor's Notes

  1. - motivação: migração java ee
  2. - Integrados
  3. simplifica a execução de aplicações Java utilizando contextos do Spring. Adoção nos micro serviços Startup de projeto rápido
  4. Conceito de starters
  5. Conceito de starters
  6. Conceito de starters
  7. SpringBootApplication / EnableAutoConfiguration (exclude) @Configuration ConditionalOnClass / ConditionalOnProperty
  8. - Versão default do tomcat 8.5
  9. 5 já consolidado no mercado mecanismos para criação de APIs Restfull através de anotação
  10. Jackson Mapping Mapeia os atributos via get Não exporta atributos que não tem valor Cuidado criar métodos com o nome get
  11. Jackson Mapping
  12. jackson-datatype-jsr310 @InitBinder
  13. - uma ferramenta que abstrai o acesso ao modelo de dados, independente a tecnologia de base de dados.
  14. - CrudRepository - Abstract DAO
  15. + Implementações
  16. Acesso aos dados sempre na interface Sem implementações - Modiying
  17. Acesso aos dados sempre na interface Sem implementações - Modiying
  18. - Atenção no padrão de nomenclatura - Também possível criar uma classe e anotar repository
  19. - Atenção no padrão de nomenclatura - Também possível criar uma classe e anotar repository
  20. Rest cria serviços a partir de repositórios JPA foi demonstrado
  21. - padrão ConcurrentMap