Submit Search
Upload
Spring I/O 2019 Recap - Moduliths
•
4 likes
•
2,064 views
T
Takeshi Ogawa
Follow
Spring I/O 2019 Recap - Moduliths
Read less
Read more
Technology
Report
Share
Report
Share
1 of 38
Download now
Download to read offline
Recommended
Spring boot for buidling microservices
Spring boot for buidling microservices
Nilanjan Roy
kyoto.js13
kyoto.js13
kamiyam .
JavaDo#09 Spring boot入門ハンズオン
JavaDo#09 Spring boot入門ハンズオン
haruki ueno
Apigee Console & eZ Publish REST
Apigee Console & eZ Publish REST
lserwatka
NongBeer MVP Demo application
NongBeer MVP Demo application
The Khaeng Doungsodsri
Android Components
Android Components
Aatul Palandurkar
Retrofit Web Forms with MVC & T4
Retrofit Web Forms with MVC & T4
soelinn
Fragments: Why, How, What For?
Fragments: Why, How, What For?
Brenda Cook
Recommended
Spring boot for buidling microservices
Spring boot for buidling microservices
Nilanjan Roy
kyoto.js13
kyoto.js13
kamiyam .
JavaDo#09 Spring boot入門ハンズオン
JavaDo#09 Spring boot入門ハンズオン
haruki ueno
Apigee Console & eZ Publish REST
Apigee Console & eZ Publish REST
lserwatka
NongBeer MVP Demo application
NongBeer MVP Demo application
The Khaeng Doungsodsri
Android Components
Android Components
Aatul Palandurkar
Retrofit Web Forms with MVC & T4
Retrofit Web Forms with MVC & T4
soelinn
Fragments: Why, How, What For?
Fragments: Why, How, What For?
Brenda Cook
Pom configuration java xml
Pom configuration java xml
akmini
Pom
Pom
akmini
Pom
Pom
Sanyam Arora
Spring Boot and Microservices
Spring Boot and Microservices
seges
Modular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJS
Gunnar Hillert
Jsf, facelets, spring, hibernate, maven2
Jsf, facelets, spring, hibernate, maven2
Raghavan Mohan
Soft shake 2013 - make use of sonar on your mobile developments
Soft shake 2013 - make use of sonar on your mobile developments
rfelden
Spring Web Service, Spring JMS, Eclipse & Maven tutorials
Spring Web Service, Spring JMS, Eclipse & Maven tutorials
Raghavan Mohan
Make use of Sonar for your mobile developments - It's easy and useful!
Make use of Sonar for your mobile developments - It's easy and useful!
cyrilpicat
Apache Maven
Apache Maven
venkatraghavang
JSF, Facelets, Spring-JSF & Maven
JSF, Facelets, Spring-JSF & Maven
Raghavan Mohan
Tips & Tricks for Maven Tycho
Tips & Tricks for Maven Tycho
Gunnar Wagenknecht
How to create a skeleton of a Java console application
How to create a skeleton of a Java console application
Dmitri Pisarenko
AOP sec3.pptx
AOP sec3.pptx
NourhanTarek23
Spring into rails
Spring into rails
Hiro Asari
Training in Android with Maven
Training in Android with Maven
Arcadian Learning
Catalyst patterns-yapc-eu-2016
Catalyst patterns-yapc-eu-2016
John Napiorkowski
The Rails Way
The Rails Way
Michał Orman
Build system
Build system
Andrey Subbota
Hibernate 5 – merge() Example
Hibernate 5 – merge() Example
Ducat India
今こそ知りたい Spring Data
今こそ知りたい Spring Data
Takeshi Ogawa
Spring Cloud Gateway on Kubernetes
Spring Cloud Gateway on Kubernetes
Takeshi Ogawa
More Related Content
Similar to Spring I/O 2019 Recap - Moduliths
Pom configuration java xml
Pom configuration java xml
akmini
Pom
Pom
akmini
Pom
Pom
Sanyam Arora
Spring Boot and Microservices
Spring Boot and Microservices
seges
Modular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJS
Gunnar Hillert
Jsf, facelets, spring, hibernate, maven2
Jsf, facelets, spring, hibernate, maven2
Raghavan Mohan
Soft shake 2013 - make use of sonar on your mobile developments
Soft shake 2013 - make use of sonar on your mobile developments
rfelden
Spring Web Service, Spring JMS, Eclipse & Maven tutorials
Spring Web Service, Spring JMS, Eclipse & Maven tutorials
Raghavan Mohan
Make use of Sonar for your mobile developments - It's easy and useful!
Make use of Sonar for your mobile developments - It's easy and useful!
cyrilpicat
Apache Maven
Apache Maven
venkatraghavang
JSF, Facelets, Spring-JSF & Maven
JSF, Facelets, Spring-JSF & Maven
Raghavan Mohan
Tips & Tricks for Maven Tycho
Tips & Tricks for Maven Tycho
Gunnar Wagenknecht
How to create a skeleton of a Java console application
How to create a skeleton of a Java console application
Dmitri Pisarenko
AOP sec3.pptx
AOP sec3.pptx
NourhanTarek23
Spring into rails
Spring into rails
Hiro Asari
Training in Android with Maven
Training in Android with Maven
Arcadian Learning
Catalyst patterns-yapc-eu-2016
Catalyst patterns-yapc-eu-2016
John Napiorkowski
The Rails Way
The Rails Way
Michał Orman
Build system
Build system
Andrey Subbota
Hibernate 5 – merge() Example
Hibernate 5 – merge() Example
Ducat India
Similar to Spring I/O 2019 Recap - Moduliths
(20)
Pom configuration java xml
Pom configuration java xml
Pom
Pom
Pom
Pom
Spring Boot and Microservices
Spring Boot and Microservices
Modular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJS
Jsf, facelets, spring, hibernate, maven2
Jsf, facelets, spring, hibernate, maven2
Soft shake 2013 - make use of sonar on your mobile developments
Soft shake 2013 - make use of sonar on your mobile developments
Spring Web Service, Spring JMS, Eclipse & Maven tutorials
Spring Web Service, Spring JMS, Eclipse & Maven tutorials
Make use of Sonar for your mobile developments - It's easy and useful!
Make use of Sonar for your mobile developments - It's easy and useful!
Apache Maven
Apache Maven
JSF, Facelets, Spring-JSF & Maven
JSF, Facelets, Spring-JSF & Maven
Tips & Tricks for Maven Tycho
Tips & Tricks for Maven Tycho
How to create a skeleton of a Java console application
How to create a skeleton of a Java console application
AOP sec3.pptx
AOP sec3.pptx
Spring into rails
Spring into rails
Training in Android with Maven
Training in Android with Maven
Catalyst patterns-yapc-eu-2016
Catalyst patterns-yapc-eu-2016
The Rails Way
The Rails Way
Build system
Build system
Hibernate 5 – merge() Example
Hibernate 5 – merge() Example
More from Takeshi Ogawa
今こそ知りたい Spring Data
今こそ知りたい Spring Data
Takeshi Ogawa
Spring Cloud Gateway on Kubernetes
Spring Cloud Gateway on Kubernetes
Takeshi Ogawa
Spring data-rest-and-spring-cloud-contract
Spring data-rest-and-spring-cloud-contract
Takeshi Ogawa
さくっと作るSpring入門 with Google Home
さくっと作るSpring入門 with Google Home
Takeshi Ogawa
Spring と TDD
Spring と TDD
Takeshi Ogawa
さくっと理解するSpring bootの仕組み
さくっと理解するSpring bootの仕組み
Takeshi Ogawa
More from Takeshi Ogawa
(6)
今こそ知りたい Spring Data
今こそ知りたい Spring Data
Spring Cloud Gateway on Kubernetes
Spring Cloud Gateway on Kubernetes
Spring data-rest-and-spring-cloud-contract
Spring data-rest-and-spring-cloud-contract
さくっと作るSpring入門 with Google Home
さくっと作るSpring入門 with Google Home
Spring と TDD
Spring と TDD
さくっと理解するSpring bootの仕組み
さくっと理解するSpring bootの仕組み
Recently uploaded
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
2toLead Limited
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Mark Simos
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
MounikaPolabathina
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
LoriGlavin3
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
LoriGlavin3
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
Manik S Magar
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
Nicole Novielli
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
Fwdays
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
Alan Dix
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
BookNet Canada
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
LoriGlavin3
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
Commit University
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
Hervé Boutemy
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
Nathaniel Shimoni
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
LoriGlavin3
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
gvaughan
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
mohitsingh558521
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
blackmambaettijean
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
DianaGray10
Recently uploaded
(20)
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
What is Artificial Intelligence?????????
What is Artificial Intelligence?????????
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
Spring I/O 2019 Recap - Moduliths
1.
2.
2 Spring I/O 2019 Spring
I/O 2018 Spring I/O 2017
3.
4.
4
5.
5
6.
6
7.
7
8.
8
9.
10.
10
11.
<dependency> <groupId>de.olivergierke.moduliths</groupId> <artifactId>moduliths-test</artifactId> <version>${moduliths.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>de.olivergierke.moduliths</groupId> <artifactId>moduliths-docs</artifactId> <version>${moduliths.version}</version> <scope>test</scope> </dependency> <repositories> <repository> <id>spring-snapshots</id> <url>https://repo.spring.io/libs-snapshot</url> </repository> </repositories> 11
12.
@Modulith // Instead
of @SpringBootApplication public class DemoApplication { public static void main(String[] args) { SpringApplication.run(DemoApplication.class, args); } } 12
13.
13
14.
14
15.
1515
16.
16
17.
@ModuleTest // Instead
of @SpringBootTest class CatalogTests { } 17
18.
...SKIP... Bootstrapping @ModuleTest for
in mode DIRECT_DEPENDENCIES (class com.example.demo.DemoApplication)… ======================================================= ========== ## ## > Logical name: order > Base package: com.example.demo.order > Direct module dependencies: inventory > Spring beans: + ….OrderRepository o ….internal.OrderServiceImpl o ….web.OrderController 18 ========================================================== Included dependencies: ========================================================== ## ## > Logical name: inventory > Base package: com.example.demo.inventory > Direct module dependencies: none > Spring beans: + ….StockRepository + ….internal.InventoryServiceImpl ==========================================================
19.
19
20.
20
21.
21
22.
. ____ _
__ _ _ / / ___'_ __ _ _(_)_ __ __ _ ( ( )___ | '_ | '_| | '_ / _` | / ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |___, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2.2.0.BUILD-SNAPSHOT) …Skip… java.lang.IllegalStateException: Module 'order' depends on non-exposed type com.example.demo.catalog.internal.PrivateSample within module 'catalog'! Method <com.example.demo.order.internal.OrderServiceImpl.completeOrder(com.example.demo.order.Order) > calls constructor <com.example.demo.catalog.internal.PrivateSample.<init>()> in (OrderServiceImpl.java:25) 22
23.
??? 23
24.
24 • •
25.
25 @EventLisetner
26.
26 public abstract class
AbstractAggregateRoot<PK extends Serializable> extends AbstractPersistable<PK> { @JsonIgnore private final transient List<Object> domainEvents = new ArrayList<>(); @DomainEvents public List<Object> getDomainEvents() { return this.domainEvents; } protected <T> T registerEvent(T event) { Assert.notNull(event, "Domain event must not be null!"); this.domainEvents.add(event); return event; } } @Component @RequiredArgsConstructor class InventoryServiceImpl implements InventoryService { private final ProductRepository productRepository; @EventListener public void on(Order.OrderCompleted event) { // do something... } }
27.
@MockBean 27 @MockBean
28.
28
29.
29
30.
30
31.
31
32.
32
33.
33 public class DemoApplicationTests
{ @Test void verifyModularity() throws IOException { // Generate documentation Documenter documenter = new Documenter(modules); Documenter.Options options = Documenter.Options.defaults() // .withExclusions(module -> module.getName().matches(".*core|.*support")); // Write overall diagram documenter.writeModulesAsPlantUml(options); // Write diagrams for each module modules.stream().forEach(it -> documenter.writeModuleAsPlantUml(it, options)); } }
34.
34 • = Spring
I/O 2019 - Moduliths OGAWA, Takeshi; :generated-docs: ../../../target/generated-docs :toc: :revnumber: {version} :revdate: {localdate} :imagesdir: ./images plantuml::{generated-docs}/moduliths/components.uml[…] plantuml::{generated-docs}/moduliths/module-catalog.uml[…] plantuml::{generated-docs}/moduliths/module-order.uml[…] plantuml::{generated-docs}/moduliths/module-inventory.uml[…]
35.
35
36.
36
37.
• • • • • • • •
Download now