Account
1.
Primeiro passo Γ© criar o projeto no Spring Boot, para isso Γ© aconselhΓ‘vel utilizar o gerador de projetos que pode ser acessado atravΓ©s do link Spring Initializr.
classDiagram
namespace account {
class AccountController {
+create(AccountIn accountIn): AccountOut
+delete(String id): void
+findAll(): List<AccountOut>
+findById(String id): AccountOut
}
class AccountIn {
-String name
-String email
-String password
}
class AccountOut {
-String id
-String name
-String email
}
}
namespace service {
class AccountResource {
+create(AccountIn accountIn): AccountOut
+delete(String id): void
+findAll(): List<AccountOut>
+findById(String id): AccountOut
}
class AccountService {
+create(AccountIn accountIn): AccountOut
+delete(String id): void
+findAll(): List<AccountOut>
+findById(String id): AccountOut
}
class AccountRepository {
+create(AccountIn accountIn): AccountOut
+delete(String id): void
+findAll(): List<AccountOut>
+findById(String id): AccountOut
}
class Account {
-String id
-String name
-String email
-String password
}
class AccountModel {
+create(AccountIn accountIn): AccountOut
+delete(String id): void
+findAll(): List<AccountOut>
+findById(String id): AccountOut
}
}
<<Interface>> AccountController
AccountController ..> AccountIn
AccountController ..> AccountOut
<<Interface>> AccountRepository
AccountController <|-- AccountResource
AccountResource *-- AccountService
AccountService *-- AccountRepository
AccountService ..> Account
AccountService ..> AccountModel
AccountRepository ..> AccountModel
Account
π account
βββ π src
β βββ π main
β βββ π java
β βββ π store
β βββ π account
β βββ π AccountController.java
β βββ π AccountIn.java
β βββ π AccountOut.java
βββ π pom.xml
mvn clean install
Service
π account-service
βββ π src
β βββ π main
β βββ π java
β β βββ π store
β β βββ π account
β β βββ π AccountApplication.java
β β βββ π AccountResource.java
β β βββ π AccountService.java
β β βββ π AccountRepository.java
β β βββ π Account.java
β β βββ π AccountModel.java
β β βββ π AccountParser.java
β βββ π resources
β βββ π application.yaml
βββ π pom.xml
βββ π Dockerfile
AccountApplication.java | |
---|---|
mvn clean package spring-boot:run