From d1f27406cf3ac6845c442ceaf053a2fef8cbc19f Mon Sep 17 00:00:00 2001 From: Vasil Khramov Date: Fri, 24 Dec 2021 14:44:15 +0300 Subject: [PATCH] BACKLOG-14: add static context root --- .../proxy/mocketbank/mpi/controller/Mpi20Controller.java | 5 +++++ src/main/resources/application.yml | 5 ++++- src/main/resources/templates/threeDsMethod_2.0_form.html | 5 ++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/rbkmoney/proxy/mocketbank/mpi/controller/Mpi20Controller.java b/src/main/java/com/rbkmoney/proxy/mocketbank/mpi/controller/Mpi20Controller.java index 56ea605..e943b25 100644 --- a/src/main/java/com/rbkmoney/proxy/mocketbank/mpi/controller/Mpi20Controller.java +++ b/src/main/java/com/rbkmoney/proxy/mocketbank/mpi/controller/Mpi20Controller.java @@ -4,6 +4,7 @@ import com.rbkmoney.proxy.mocketbank.mpi.handler.mpi20.CardHandler; import com.rbkmoney.proxy.mocketbank.mpi.model.mpi20.*; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Value; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.ModelAndView; @@ -17,6 +18,9 @@ public class Mpi20Controller { private final List cardHandlers; + @Value("${static.context.root}") + private String staticContextRoot; + @PostMapping(value = "/prepare") public PreparationResponse prepare(@RequestBody PreparationRequest preparationRequest) { return cardHandlers.stream() @@ -52,6 +56,7 @@ public class Mpi20Controller { model.setViewName("threeDsMethod_2.0_form"); model.addObject("action", termUrl); model.addObject("threeDSMethodData", threeDSMethodData); + model.addObject("staticContextRoot", staticContextRoot); log.info("Form threeDsMethod 2.0 show the form"); return model; } diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 6ff2634..8becefd 100755 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -42,7 +42,10 @@ mpi20: callbackUrl: http://127.0.0.1:8018 pathThreeDsMethodUrl: "/mpi20/three_ds_method" pathAcsUrl: "/mpi20/acs" - +--- +static: + context: + root: /mocketbank-mpi --- fixture: cards: classpath:fixture/cards.csv diff --git a/src/main/resources/templates/threeDsMethod_2.0_form.html b/src/main/resources/templates/threeDsMethod_2.0_form.html index 3e11925..7ebd604 100644 --- a/src/main/resources/templates/threeDsMethod_2.0_form.html +++ b/src/main/resources/templates/threeDsMethod_2.0_form.html @@ -11,6 +11,9 @@ - + \ No newline at end of file