mirror of
https://github.com/valitydev/proxy-mocketbank-mpi.git
synced 2024-11-06 00:15:20 +00:00
BACKLOG-14: add static context root
This commit is contained in:
parent
3f64a9ee56
commit
d1f27406cf
@ -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<CardHandler> 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;
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -11,6 +11,9 @@
|
||||
</form>
|
||||
</body>
|
||||
|
||||
<script type="text/javascript" charset="utf-8" th:src="@{/js/submit.js}" th:inline="javascript"></script>
|
||||
<script type="text/javascript"
|
||||
charset="utf-8"
|
||||
th:src="@{{context}/js/submit.js(context=${staticContextRoot})}"
|
||||
th:inline="javascript"></script>
|
||||
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user