Hexagonal Architecture with Java Spring
Create an application to work without either a UI or a database so you can run automated regression-tests
Last updated
Create an application to work without either a UI or a database so you can run automated regression-tests
Last updated
com.puglieseweb.app.sampleapp
config
adapters
broker
db
repositories
adapters
inboud
outboud
domain
service (containing all the ports)
model
config
class ArticleResponse {
private final String id;
private final String title;
private final String content;
private final String authorName;
static ArticleResponse of(Article article) {
return new ArticleResponse(article.id().value(),
article.title().value(),
article.content().value(),
article.author().name());
}
//boilerplate code omitted
}ArticleResponse.of(domainArticle) domainArticle.toResponse()