Compare commits
3 Commits
371c4fa5aa
...
857d97c142
Author | SHA1 | Date | |
---|---|---|---|
857d97c142 | |||
4b333ff748 | |||
92ba0f5729 |
@ -1,8 +1,8 @@
|
||||
# Spring Boot + Axon Framework
|
||||
### Concepts to implement
|
||||
- [ ] Event Sourcing
|
||||
- [x] Event Sourcing
|
||||
- [x] CQRS System
|
||||
- [ ] DDD
|
||||
- [ ] CQRS System
|
||||
|
||||
### Contributors
|
||||
- [x] Sambo Chea <sombochea@cubetiqs.com>
|
@ -2,23 +2,10 @@ package com.cubetiqs.demo.axon
|
||||
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication
|
||||
import org.springframework.boot.runApplication
|
||||
import org.springframework.http.ResponseEntity
|
||||
import org.springframework.web.bind.annotation.GetMapping
|
||||
import org.springframework.web.bind.annotation.RequestMapping
|
||||
import org.springframework.web.bind.annotation.RestController
|
||||
|
||||
@SpringBootApplication
|
||||
class AxonApplication
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
runApplication<AxonApplication>(*args)
|
||||
}
|
||||
|
||||
@RestController
|
||||
@RequestMapping
|
||||
class DefaultController {
|
||||
@GetMapping
|
||||
fun index(): ResponseEntity<Any> {
|
||||
return ResponseEntity.ok("ok")
|
||||
}
|
||||
}
|
@ -40,7 +40,7 @@ class AccountCommandController @Autowired constructor(
|
||||
fun debitMoneyFromAccount(
|
||||
@PathVariable(value = "accountId") accountId: String,
|
||||
@RequestBody moneyDebitDTO: MoneyAmountDTO
|
||||
): CompletableFuture<String?>? {
|
||||
): CompletableFuture<String?> {
|
||||
return this.accountCommandService.debitMoneyFromAccount(accountId, moneyDebitDTO)
|
||||
}
|
||||
}
|
@ -10,12 +10,14 @@ import springfox.documentation.spi.DocumentationType
|
||||
import springfox.documentation.spring.web.plugins.Docket
|
||||
import springfox.documentation.swagger2.annotations.EnableSwagger2
|
||||
import java.util.Collections
|
||||
import java.util.concurrent.CompletableFuture
|
||||
|
||||
@Configuration
|
||||
@EnableSwagger2
|
||||
class SwaggerConfiguration {
|
||||
@Bean
|
||||
fun apiDocket(): Docket {
|
||||
val ignoreClasses = arrayListOf(CompletableFuture::class.java).toTypedArray()
|
||||
return Docket(DocumentationType.SWAGGER_2)
|
||||
.select()
|
||||
.apis(
|
||||
@ -24,6 +26,7 @@ class SwaggerConfiguration {
|
||||
)
|
||||
.paths(PathSelectors.any())
|
||||
.build()
|
||||
.ignoredParameterTypes(*ignoreClasses)
|
||||
.apiInfo(apiInfo)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user