File tree Expand file tree Collapse file tree
java/com/dddheroes/heroesofddd/resourcespool Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11### BuildDwelling
22@gameId = scenario-1
3+ @playerId = player-1
34@dwellingId = dwelling-1
5+
6+ ### BuildDwelling
47PUT http://localhost:8080/games/{{gameId}}/dwellings/{{dwellingId}}
58Content-Type: application/json
9+ X-Player-Id: {{playerId}}
610
711{
812 "creatureId" : " angel" ,
@@ -15,6 +19,7 @@ Content-Type: application/json
1519### IncreaseAvailableCreatures
1620PUT http://localhost:8080/games/{{gameId}}/dwellings/{{dwellingId}}/available-creatures-increases
1721Content-Type: application/json
22+ X-Player-Id: {{playerId}}
1823
1924{
2025 "creatureId" : " angel" ,
@@ -24,6 +29,7 @@ Content-Type: application/json
2429### RecruitCreature
2530PUT http://localhost:8080/games/{{gameId}}/dwellings/{{dwellingId}}/creature-recruitments
2631Content-Type: application/json
32+ X-Player-Id: {{playerId}}
2733
2834{
2935 "creatureId" : " angel" ,
Original file line number Diff line number Diff line change 55import com .dddheroes .heroesofddd .resourcespool .write .ResourcesPool ;
66import com .dddheroes .heroesofddd .resourcespool .write .withdraw .PaidCommandInterceptor ;
77import org .axonframework .modelling .command .Repository ;
8+ import org .springframework .boot .autoconfigure .condition .ConditionalOnProperty ;
89import org .springframework .context .annotation .Bean ;
910import org .springframework .context .annotation .Configuration ;
1011
1314@ Configuration
1415class ResourcePoolConfiguration {
1516
17+ @ ConditionalOnProperty (value = "application.interceptors.paid-commands.enabled" , havingValue = "true" )
1618 @ Bean
1719 PaidCommandInterceptor paidCommandInterceptor (
1820 Set <CommandCostResolver <?>> commandCostResolvers ,
Original file line number Diff line number Diff line change 4646 sequencing-policy : gameIdSequencingPolicy
4747application :
4848 maintenance :
49- enabled : true
49+ enabled : true
50+ interceptors :
51+ paid-commands :
52+ enabled : false
53+
54+ springdoc :
55+ api-docs :
56+ path : /api-docs
57+ swagger-ui :
58+ path : /swagger-ui.html
59+ operationsSorter : method
60+ tagsSorter : alpha
61+ docExpansion : none
Original file line number Diff line number Diff line change 1+ application :
2+ interceptors :
3+ paid-commands :
4+ enabled : true
You can’t perform that action at this time.
0 commit comments