Java 9 - Módulos (Rafael Nascimento
-
Upload
concrete -
Category
Technology
-
view
46 -
download
1
Transcript of Java 9 - Módulos (Rafael Nascimento
![Page 1: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/1.jpg)
![Page 2: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/2.jpg)
JAVA 9 - Módulos
Rafael Nascimento
![Page 3: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/3.jpg)
JSR 376
JIGSAW
![Page 4: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/4.jpg)
HISTÓRIA
![Page 5: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/5.jpg)
Linha do tempo
2008 - Início do projeto
2014 - Primeiras implementações
2017 - Jigsaw JDK9
![Page 6: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/6.jpg)
Objetivos
● Configuração confiável;
● Forte encapsulamento;
● Plataforma escalável;
● Melhorar desempenho;
![Page 7: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/7.jpg)
Objetivos
● Configuração confiável;
● Forte encapsulamento;
![Page 8: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/8.jpg)
TEORIA
![Page 9: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/9.jpg)
O que é um módulo
Em java, um módulo é um conjunto de componentes.
.class, pacotes, jars.
![Page 10: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/10.jpg)
Como criar uma aplicação modularizada
![Page 11: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/11.jpg)
Como definir um módulo
![Page 12: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/12.jpg)
Diretivas
requires
exports
opens
provides
uses
![Page 13: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/13.jpg)
Diretivas
requires
![Page 14: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/14.jpg)
Diretivas
exports
![Page 15: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/15.jpg)
Diretivas
opens
![Page 16: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/16.jpg)
Diretivas
opens
![Page 17: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/17.jpg)
Diretivas
provides
![Page 18: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/18.jpg)
Diretivas
uses
![Page 19: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/19.jpg)
Modificadores
requires static transitive
![Page 20: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/20.jpg)
Modificadores
requires static transitive
provideswith
![Page 21: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/21.jpg)
Modificadores
requires static transitive
provideswith
exportsto
![Page 22: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/22.jpg)
Modificadores
requires static transitive
provideswith
exportsto
opensto
![Page 23: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/23.jpg)
O que Já temosComo utilizar?
![Page 24: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/24.jpg)
Módulos automáticos
![Page 25: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/25.jpg)
VANTAGENS
![Page 26: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/26.jpg)
VANTAGENS
Jarhell
Encapsulamento
Performance
backend-api
commons.lang-2.6.jarSpring
common-lang.1.1.jar
![Page 27: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/27.jpg)
VANTAGENS
Jarhell
Encapsulamento
Performance
Main Controller
Data
![Page 28: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/28.jpg)
VANTAGENS
Jarhell
Encapsulamento
PerformanceCom o sistema de módulos, as aplicações deverão utilizar apenas os módulos necessários para execução.
![Page 29: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/29.jpg)
*Comparativo realizado no jvisualVM
![Page 30: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/30.jpg)
*Comparativo realizado no jvisualVM
![Page 31: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/31.jpg)
DESVANTAGENS
![Page 32: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/32.jpg)
DESVANTAGENS
Pacotes divididos
Dependências de terceiros Se
curit
y A
PP
security-hash.jar
crypto-api.jar
java.sec.Security.class
java.sec.HashEnum.class
java.sec.Asymetric.class
java.sec.Symetric.class
![Page 33: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/33.jpg)
DESVANTAGENS
Pacotes divididos
Dependências de terceiros
Error:java: the unnamed module reads package org.apache.juli.logging from both tomcat.juli and tomcat.embed.core
![Page 34: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/34.jpg)
DESVANTAGENS
Pacotes divididos
Dependências de terceiros
![Page 35: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/35.jpg)
DÚVIDAS
![Page 36: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/36.jpg)
https://jcp.org/en/jsr/proposalDetails?id=376
https://docs.oracle.com/javase/specs/jls/se9/html/jls-7.html#jls-7.7.3
https://stackoverflow.com/questions/44697738/how-to-resolve-module-reads-package-error-in-java9
https://www.concrete.com.br/2017/10/09/introducao-ao-java-9-quais-sao-as-principais-novidades/
https://github.com/rafass90/codersonbeer-app
Referências
![Page 37: Java 9 - Módulos (Rafael Nascimento](https://reader034.fdocumentos.tips/reader034/viewer/2022051404/5a650e7d7f8b9af3398b52cd/html5/thumbnails/37.jpg)
Centro
Av. Presidente Wilson,
231 - 29º andar
(21) 2240-2030
Cidade Monções
Av. Nações Unidas,
11.541 - 3º andar
(11) 4119-0449
Savassi
Av. Getúlio Vargas, 671
Sala 800 - 8º andar
(31) 3360-8900
www.concrete.com.br